How to debug the program

Posted by Mahesh_Chs under C# on 8/4/2012 | Points: 10 | Views : 963 | Status : [Member] | Replies : 9
Hi,
how to debug the program when we press Cltr+F5.




Responses

Posted by: Gopesh9 on: 8/4/2012 [Member] Starter | Points: 25

Up
0
Down
At first add breakpoints and when you run your application it will be in debug mode.

G. S.
.Net Developer

Mahesh_Chs, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Gunthejagan on: 8/5/2012 [Member] Starter | Points: 25

Up
0
Down
Set breakpoint for the line from where u want to start debugging the code. Press F11 to go line by line and you can see the results when mouse over the variables or in the quick watch window.

Mahesh_Chs, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Mahesh_Chs on: 8/5/2012 [Member] Starter | Points: 25

Up
0
Down
Hi,

when we press cltr+F5 it will run the program without debugging but I want to run the program in debug mode when i press cltr+F5

Mahesh_Chs, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Gopesh9 on: 8/5/2012 [Member] Starter | Points: 25

Up
0
Down
You cannot start running the program in debugging mode when you click ctrl + F5. You can simply use F5 for running the program in debugging mode. Its the inbuilt feature of Visual Studio IDE. You cannot change it manually.

G. S.
.Net Developer

Mahesh_Chs, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Megan00 on: 8/5/2012 [Member] Starter | Points: 25

Up
0
Down
I agree with Gopesh9, ctrl + F5 can not debug your program, only use F5 that is OK, but if you have multiple projects, you should better use "Debug"-"Start Debugging" at the top. Or right click your project and choose "Debug" item, then "Start new instance" all the three methods can run your project. and the second and third are better than directly press F5

Never give up! Smile to the world!
http://excelcsharp.blog.com/

Mahesh_Chs, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Mahesh_Chs on: 8/6/2012 [Member] Starter | Points: 25

Up
0
Down
Hi,

yeah we can run with F5 i know that, but there is a chance to run the program with cltr+F5. some process we need to attach

Mahesh_Chs, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Megan00 on: 8/6/2012 [Member] Starter | Points: 25

Up
0
Down
Hi, besides, your method, there are still at least two methods to do so. cltr+F5 or F5 sometimes is very likely to mis-open project.

Never give up! Smile to the world!
http://excelcsharp.blog.com/

Mahesh_Chs, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Gopesh9 on: 8/6/2012 [Member] Starter | Points: 25

Up
0
Down
Hey Mahesh_chs,

Ctrl+F5 means "Build and run the project", and F5 means "Build and run the project under the debugger".
Running with the debugger attached does have some performance penalties, so Ctrl+F5 will generally make your app run a bit faster. So when you use ctrl + F5 it will run under the debugger only. Yeah you can change the Visual Studio settings but it will not be so beneficial.


G. S.
.Net Developer

Mahesh_Chs, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Mahesh_Chs on: 8/6/2012 [Member] Starter | Points: 25

Up
0
Down
Hi,

Thanks

i know it is not so benfitable, but i want to know the process

Mahesh_Chs, if this helps please login to Mark As Answer. | Alert Moderator

Login to post response