Bureaucrats, cc_docs_admin, cc_staff
337
edits
No edit summary |
No edit summary |
||
Line 12: | Line 12: | ||
To be able to debug with pgdbg you first need to compile your code with debugging information enabled. With the pgdbg you do so by adding a debugging flag "-g": | To be able to debug with pgdbg you first need to compile your code with debugging information enabled. With the pgdbg you do so by adding a debugging flag "-g": | ||
{{Command|pgcc -g program.c -o program}} | {{Command|pgcc -g program.c -o program}} | ||
=== Execute your code === | |||
Once your code is compiled with the proper options, you execute it: | |||
{{Command|pgdbg program arg1 arg2}} | |||
If you have set the X11 forwarding then the pgdbg will start in the graphical mode in a pop-up window. If you don't have X11 forwarding, you can run pgdbg in a text mode by adding an extra option "-text" : | |||
{{Command|pgdbg -text program arg1 arg2}} |