1

As you know,eclipse IDE has a convenient attached debugging facility for C project.You can see it from the GUI and you can use this facility to debug process that are already in running status,like daemon process..

My question is that when a process just started and I want to debug it from the begining of the process(i.e. from the first line of main function),how I can do it using the IDE?

I know under Windows,there is a tool called gflag,using this tool we can do some configuraitons before starting the process,and when the process is launched,the gflag can detect this and let the debugger tool(e.g. virtual studio) attach the process automatically.

Do not tell me that use sleep fuction.

2 Answers 2

1

Check CDT reverse debugging. You will need GDB 7.0 or later for this feature.

Refer How_do_I_do_Reverse_Debugging

Sign up to request clarification or add additional context in comments.

Comments

0

Open source code with eclipse and double click the left of line number to add a break point. Then you can create a session to debug your application

2 Comments

Sorry,but you don't answer my question.
@HarlanChen I think launching the process manually is just the same as attaching it automatically when it is launched. So what configurations do you set before debugging your app?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.