how to config debuger for an specific program [message #1749007] |
Thu, 01 December 2016 04:18 |
samira af Messages: 8 Registered: January 2016 |
Junior Member |
|
|
HI all,
I have a folder for a program it contains video folder, audio folder, result folder, Pgm folder, sendercofig.txt and receivercofig.txt.
In video folder is a video and in audio folder is an audio. in pgm isa build folder and src folder.
in src there are many cpp files .
for building the program i opened build folder in terminal and cmake .. then make.
I have an executable with name pgm.
to run the program i have to use two terminal one for sender and one for receiver. then in one terminal i will write command:
./pgm /path/receivercofig 127.0.0.1 7777 ( 7777 is the port number)
in another terminal:
./pgm /path/sendercofig 127.0.0.1 7777 ( 7777 is the port number)
i did the following, which is not working correctly. Could you please guide me?
[Updated on: Thu, 01 December 2016 04:27] Report message to a moderator
|
|
|
|
|
|
|
Re: how to config debuger for an specific program [message #1749129 is a reply to message #1749119] |
Fri, 02 December 2016 08:17 |
David Vavra Messages: 1426 Registered: October 2012 |
Senior Member |
|
|
I don't understand. Didn't you say you have two programs?
Quote:
one terminal i will write command:
./pgm /path/receivercofig 127.0.0.1 7777 ( 7777 is the port number)
in another terminal:
./pgm /path/sendercofig 127.0.0.1 7777 ( 7777 is the port number)
Even if they are the same program, you should be able to start a debug session on the first then, while it's running, start a second.
They will both be in the Debug View.
Here's an example of debugging two copies of the same program. It could easily have been two different programs.
Don't know why the button would be grayed. Mine doesn't. You may need to use the Run menu instead.
EDIT:
I see you still don't understand how to set up the launcher.
You put the name of the program in the Main tab and the arguments in the Arguments tab.
If the program requires no arguments, the Arguments tab will be empty.
[Updated on: Fri, 02 December 2016 08:50] Report message to a moderator
|
|
|
Re: how to config debuger for an specific program [message #1749179 is a reply to message #1749129] |
Fri, 02 December 2016 17:40 |
samira af Messages: 8 Registered: January 2016 |
Junior Member |
|
|
Thanks a lot.
Now i have both on Debug information and they can run parallel and i can check line by line each of receiver and sender.
The result of each one (receiver and sender) is shown in separate console. First, I need your confirm that it is correct?
Then, is there any possibility that i can see sender console and receiver console based on the order. I mean for example,
currently, when i am checking sender console (i can use F6 or F5) it shows at 1s, first packet sent, then at 2 s, the seconed packet was sent. Then, i can pause sender debug and resume receiver debug in debugger information and i can check commands (with F6 or F5) in receiver console I can see the first packet arrived in 1.5s and the seconed packet arrived at 2.5s.
what i prefer to see is:
The first packet is sent at 1s from sender ( sender console becomes active) then it goes through receiver console to see at 1.5 s the packet arrived ( receiver console becomes active). Then at 2s next packet sends in sender console ( sender console becomes active) and in 2.5 the second packet is arrived in receiver console ( receiver console becomes active).
I hope that i could explain my question .
Thanks again.
[Updated on: Fri, 02 December 2016 17:41] Report message to a moderator
|
|
|
Re: how to config debuger for an specific program [message #1749190 is a reply to message #1749179] |
Fri, 02 December 2016 20:49 |
David Vavra Messages: 1426 Registered: October 2012 |
Senior Member |
|
|
Glad you got it working.
I don't think there's any way to tie the two consoles together -- at lest not easily or without redesign of your code.
You can have two consoles displayed at the same time though.
Just add another console view.
In my experience, trying to debug and get good timing are mutually exclusive goals.
I would use the debugger to verify that the actions are correct then work on the tiiming some other way.
Maybe with trace messages. YMMV
Good luck!
[Updated on: Fri, 02 December 2016 21:02] Report message to a moderator
|
|
|
Powered by
FUDForum. Page generated in 0.04309 seconds