Dante
Dante

Reputation: 3891

Visual Studio 2013 automatically prompt debugging in first line of server side code

Is it possible to have Visual Studio automatically stop in debug mode in the first line of server side code that is being executed, without having to explicitly set a breakpoint?

Lets say I have a web forms application and I have VS 2013 attached to the worker process. I would like, when I press a button, for VS to stop in the first line of server side code so that I can debug it without having to provide a break point.

Thank you in advance

Upvotes: 0

Views: 152

Answers (2)

Markus Bruckner
Markus Bruckner

Reputation: 2880

If its possible for you to launch a new debugging session, you can try Debug -> Step Into new Instance from the context menu (right click) of your web project.

Upvotes: 0

Adil
Adil

Reputation: 148150

You can use System.Diagnostics.Debugger.Launch to start debugging without setting break point. Make sure you remove this in production.

Instead of launch the debugger for tracking the application/data flow you better write log on each step to trace the flow and errors. As if you start debugger it would not return the response until the execution get completed and you manually complete the debugging.

Upvotes: 1

Related Questions