Conditional Breakpoint failed

43 Views Asked by At

I'm creating a dll in c# which will be an addin for a host application, Revit. I've set a conditional breakpoint in my code while attempting to debug some issues. This is my debugging process:

  • Build my dll
  • Post build events copy the new files to appropriate addin folders
  • I launch Revit manually and open a file I'm using for testing
  • In Visual Studio I select Debug -> Attach to Process -> Revit.exe
  • I click the button in Revit to launch the command.

I'm running Visual Studio 2022 professional edition in admin mode while Revit is running in user mode (ie not admin mode).

The code runs fine when there is no breakpoint. When I set a conditional breakpoint I get the error below. What I'm attempting to do is hit the breakpoint once a specific string is "volume"

Any light that can be shed on the topic would be greatly appreciated.

enter image description here

1

There are 1 best solutions below

4
On

I suggest that you do not start Revit.exe externally, but instead set it as a start-up program in the Visual Studio debug settings. Then you do not need to attach to process. That is what I always do.