Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 162
  • Last Modified:

Setting breakpoints

Is it possible to set breakpoints for every line of code?

Is it possible to know what the first line of code is?  Meaning...when I debug - the first line of code I visit where I can set a breakpoint?

I'm new to MVC and I am wanting to get a better idea of what the code is doing, from the beginning.
0
Tom Knowlton
Asked:
Tom Knowlton
  • 2
  • 2
2 Solutions
 
käµfm³d 👽Commented:
Not that I'm aware. You can always set a breakpoint at the start of your application and single-step through the code via the F10/F11 keys--the former steps over a line, even if it is a function all; the latter steps into a line, which means if you are at a function call you will proceed into that function's code. With an ASP.NET project it's a bit more difficult to know where execution begins. Once you are running live and you page is rendered in the browser, I would say that putting a breakpoint at the beginning of each action's function body would be cause you to break at the beginning of that execution.
0
 
dustockCommented:
You could right click on the project and go down to debug and then choose step into new instance, that will go to where to program starts and allow you to step through.

step_in
0
 
käµfm³d 👽Commented:
While dustock isn't incorrect in what he states, ASP.NET really has two forms of execution:  One is the actual execution of the ASP.NET host application, which is what dustock's example demonstrates, and the other is the processing of an actual request. Technically speaking, the host application is the only thing executing, but when you start thinking about what the client sees/does on your application, then for them execution is the processing of an individual request. This differentiation is what I was referring to above when I said, "it's a bit more difficult to know where execution begins".
0
 
dustockCommented:
Well said kaufmed!
0
 
Tom KnowltonWeb developerAuthor Commented:
Thank you both.  : )
0

Featured Post

[Webinar] Database Backup and Recovery

Does your company store data on premises, off site, in the cloud, or a combination of these? If you answered “yes”, you need a data backup recovery plan that fits each and every platform. Watch now as as Percona teaches us how to build agile data backup recovery plan.

  • 2
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now