I am working on a C#.NET class library project in VS2010. In my project settings -> debug settings, I have the project set to start an external program (C:\Windows\SysWOW64\wscript.exe) which runs a very simple jscript file (test.js). The script simply creates an instance of the class and calls one of it's methods.
The problem is when I start debugging, VS2010 does not stop at any of my breakpoints. If I open up the exact same project in VS2008 it does stop at the break points. Is there a new setting somewhere that is preventing the breakpoints from being hit? Has anyone else ran into this issue?
My first check would be to disable "Just My Code"
Try the scenario again.
The problem could be your browser is using a cached version of the page, you are working with. Try to add som nonsense extra querystring in your adress line of the browser f.x. add ?NONSENSE=1234 This forces the browser to use a new version of the web page since it does not know if the page should look different with this Query in the end. Next time use ?NONSENS=1235.
To solved this problem by creating a config file for the application which is using the component to debug with the following data:
With this file you tell the debugger to use the right runtime version for debugging (it seems the debugger uses version 4.0 by default).
While I can't answer why it happens, I can provide you with workaround.
Include
At the very beginning of your code (Class constructor for instance) place the following lines:
Start debugging.
breakpoint should trigger in your code. Other breakpoints should trigger as well.
For me it was fixed by:
Open the project properties is VS2010
Goto Compile -> Advanced Compile Options
Change 'Generate debug Info' from 'None' to 'Full'
If the reason is wrong .NET runtime version (which was my problem), instead of creating configuration file you can simply choose the right version in the Attach to process dialog.
In the dialog, next to Attach to click on Select and switch from Automatically... to Debug these code types where you should check the right version.
If this was your problem also, then you probably had "Symbols not loaded" message on your breakpoints. Immediately after selecting the right version you should see that this error is no longer reported.