What you want to see on DotNetFunda.com ?
DotNetFunda.Com Logo
Twitter TwitterLinkedIn
YouTubeGoogle
 Online : 48979 |  Welcome, Guest!   Register  Login
 Home > Forums > C# > How to debug the program ...
Mahesh_Chs

How to debug the program

Replies: 9 | Posted by: Mahesh_Chs on 8/4/2012 | Category: C# Forums | Views: 281 | Status: [Member] | Points: 10  


Hi,
how to debug the program when we press Cltr+F5.


Reply | Reply with attachment | Alert Moderator

 Responses below this adGet hundreds of .NET Tips and Tricks videos

 Replies

Gopesh9
Gopesh9  
Posted on: 8/4/2012 3:34:51 PM
Level: Starter | Status: [Member] | Points: 25

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. | Reply | Alert Moderator 

Gunthejagan
Gunthejagan  
Posted on: 8/5/2012 3:15:00 AM
Level: Starter | Status: [Member] | Points: 25

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. | Reply | Alert Moderator 

Mahesh_Chs
Mahesh_Chs  
Posted on: 8/5/2012 10:21:08 AM
Level: Starter | Status: [Member] | Points: 25

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. | Reply | Alert Moderator 

Gopesh9
Gopesh9  
Posted on: 8/5/2012 1:31:46 PM
Level: Starter | Status: [Member] | Points: 25

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. | Reply | Alert Moderator 

Megan00
Megan00  
Posted on: 8/5/2012 10:21:15 PM
Level: Starter | Status: [Member] | Points: 25

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. | Reply | Alert Moderator 

Mahesh_Chs
Mahesh_Chs  
Posted on: 8/6/2012 1:36:57 AM
Level: Starter | Status: [Member] | Points: 25

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. | Reply | Alert Moderator 

Megan00
Megan00  
Posted on: 8/6/2012 2:14:57 AM
Level: Starter | Status: [Member] | Points: 25

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. | Reply | Alert Moderator 

Gopesh9
Gopesh9  
Posted on: 8/6/2012 2:31:17 AM
Level: Starter | Status: [Member] | Points: 25

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. | Reply | Alert Moderator 

Mahesh_Chs
Mahesh_Chs  
Posted on: 8/6/2012 2:36:18 AM
Level: Starter | Status: [Member] | Points: 25

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. | Reply | Alert Moderator 

Reply - Please login to reply


Click here to login & reply

Found interesting? Add this to:


 Latest Posts

Write New Post | More ...

About Us | Contact Us | The Team | Advertise | Software Development | Write for us | Testimonials | Privacy Policy | Terms of Use | Link Exchange | Members | Go Top
General Notice: If you find plagiarised (copied) contents on this page, please let us know the original source along with your correct email id (to communicate) for further action.
Copyright © DotNetFunda.Com. All Rights Reserved. Copying or mimicking the site design and layout is prohibited. Logos, company names used here if any are only for reference purposes and they may be respective owner's right or trademarks. | 5/24/2013 9:00:47 AM