How does one go about setting the working directory for use with the debugger plugin? Right now, it wants to start the debug at my base directory which is where my source files are. I want to be able to set a working directory (where my test files are) so that the debugger executes the target in that directory instead.
Also, is there a way to debug using the build settings?
On 13-07-08 08:57 AM, Drake, Johnathan wrote:
How does one go about setting the working directory for use with the debugger plugin? Right now, it wants to start the debug at my base directory which is where my source files are. I want to be able to set a working directory (where my test files are) so that the debugger executes the target in that directory instead.
`gdb --help` shows `--cd=DIR` "Change current directory to DIR". You could probably stick that argument into the "Command Line Arguments" box.
Also, is there a way to debug using the build settings?
Not sure if I follow, but you could add a build command to run GDB, of course it wouldn't integrate with the Debugger plugin at all.
Cheers, Matthew Brush
Thanks for the reply Matthew. the command line arguments appear to be arguments for my target application so I wasn't able to change directories via that method. However, when I press the run button, i get several messages showing in the terminal window where I launched Geany. Those messages are:
GLib-CRITICAL **: g_string_free: assertion 'string != NULL' failed
GLib-CRITICAL **: g_hash_table_remove_all: assertion 'hash_table != NULL' failed
As for the second part of my question, you were on the right path. I was looking for a way to integrate with the debugger plugin from the execute comman window. Currently, I am launching ddd from the execute command window and it works fine.
I come from the Visual Studio world so I am finding ddd to not be quite as nice and easy to use.
----------------------------------------------------- John David Drake | MTSI Modeling and Simulation Analyst phone: 256.417.6744 | fax 256.417.6744 mobile: 615.653.6470 | email: johnathan.drake@mtsi-va.com ________________________________ From: users-bounces@lists.geany.org [users-bounces@lists.geany.org] On Behalf Of Matthew Brush [mbrush@codebrainz.ca] Sent: Monday, July 08, 2013 10:29 PM To: users@lists.geany.org Subject: Re: [Geany-Users] set working directory for debug
On 13-07-08 08:57 AM, Drake, Johnathan wrote:
How does one go about setting the working directory for use with the debugger plugin? Right now, it wants to start the debug at my base directory which is where my source files are. I want to be able to set a working directory (where my test files are) so that the debugger executes the target in that directory instead.
`gdb --help` shows `--cd=DIR` "Change current directory to DIR". You could probably stick that argument into the "Command Line Arguments" box.
Also, is there a way to debug using the build settings?
Not sure if I follow, but you could add a build command to run GDB, of course it wouldn't integrate with the Debugger plugin at all.
Cheers, Matthew Brush
_______________________________________________ Users mailing list Users@lists.geany.org https://lists.geany.org/cgi-bin/mailman/listinfo/users
Am 09.07.2013 13:56, schrieb Drake, Johnathan:
Thanks for the reply Matthew. the command line arguments appear to be arguments for my target application so I wasn't able to change directories via that method. However, when I press the run button, i get several messages showing in the terminal window where I launched Geany. Those messages are:
You separate gdb arguments from application arguments using the --args argument.
E.g. gdb <gdb_arguments> --args <program_arguments> <program>
It appears from the debugger plugin source that it gets the path from the target to be used as the working directory (dbm_gdb.c:721). The commandline arguments that can be input in the debugger plugin appear to be used as only inputs to the target application so adding the --cd option doesn't do anything for me.
________________________________ From: users-bounces@lists.geany.org [users-bounces@lists.geany.org] On Behalf Of Thomas Martitz [thomas.martitz@student.htw-berlin.de] Sent: Tuesday, July 09, 2013 7:05 AM To: Geany general discussion list Subject: Re: [Geany-Users] set working directory for debug
Am 09.07.2013 13:56, schrieb Drake, Johnathan: Thanks for the reply Matthew. the command line arguments appear to be arguments for my target application so I wasn't able to change directories via that method. However, when I press the run button, i get several messages showing in the terminal window where I launched Geany. Those messages are:
You separate gdb arguments from application arguments using the --args argument.
E.g. gdb <gdb_arguments> --args <program_arguments> <program>
On Mon, 8 Jul 2013 10:57:09 -0500 "Drake, Johnathan" johnathan.drake@mtsi-va.com wrote:
How does one go about setting the working directory for use with the debugger plugin?
You can do that with the scope plugin Setup Program dialog.
Also, is there a way to debug using the build settings?
In the same dialog, you can Import the second build Executable and it's working directory, and set the command line arguments. If that second Executable is just a file name, without any arguments and % expansion, scope will reload it's debugging settings automatically on startup or project open.
Thanks for the reply. I have attempted to use Scope and although it does give me the working directory option, it doesn't seem to let me set break points in my code.
My simulation is a mixed language C++/FORTRAN. In order to get a breakpoint in the C++ code, I had to right-click in the breakpoint window because the breakpoint button in the menu bar was greyed out. Also, I cannot set a breakpoint in my FORTRAN code at all (at least by any method that I am aware of). I can however break in the C++ code where the FORTRAN is called and step-in although I can't use the locals or watch windows once into the FORTRAN code.
Also when using scope, I am getting the following messages in the terminal window where geany was launched:
Gtk-CRITICAL **: gtk_tree_model_get_path: assertion 'iter != NULL' failed
________________________________ From: users-bounces@lists.geany.org [users-bounces@lists.geany.org] On Behalf Of Dimitar Zhekov [dimitar.zhekov@gmail.com] Sent: Tuesday, July 09, 2013 3:47 AM To: Geany general discussion list Subject: Re: [Geany-Users] set working directory for debug
On Mon, 8 Jul 2013 10:57:09 -0500 "Drake, Johnathan" johnathan.drake@mtsi-va.com wrote:
How does one go about setting the working directory for use with the debugger plugin?
You can do that with the scope plugin Setup Program dialog.
Also, is there a way to debug using the build settings?
In the same dialog, you can Import the second build Executable and it's working directory, and set the command line arguments. If that second Executable is just a file name, without any arguments and % expansion, scope will reload it's debugging settings automatically on startup or project open.
-- E-gards: Jimmy _______________________________________________ Users mailing list Users@lists.geany.org https://lists.geany.org/cgi-bin/mailman/listinfo/users
On Tue, 9 Jul 2013 07:08:54 -0500 "Drake, Johnathan" johnathan.drake@mtsi-va.com wrote:
My simulation is a mixed language C++/FORTRAN. In order to get a breakpoint in the C++ code, I had to right-click in the breakpoint window because the breakpoint button in the menu bar was greyed out.
Acknowledged. Debug -> Toggle breakpoint, and any keybinding to this functon, should work properly too.
Also, I cannot set a breakpoint in my FORTRAN code at all (at least by any method that I am aware of). I can however break in the C++ code where the FORTRAN is called and step-in although I can't use the locals or watch windows once into the FORTRAN code.
Acknowledged. You can try to switch to the other Fortran type, if that doesn't mess the highlighting (I haven't noticed there are two).
The certain way to set any breakpoint disregarding the Scope rules is to invoke Debug -> GDB Command and enter "break filename:line", "break <function>", "-break-insert filename:line", or any other gdb syntax. If your GDB is recent enough, the new breakpoint will be automatically placed in the Breakpoints list. Otherwise, right click and Refresh it.
Also when using scope, I am getting the following messages in the terminal window where geany was launched:
Gtk-CRITICAL **: gtk_tree_model_get_path: assertion 'iter != NULL' failed
Can you describe in brief the sequence of actions to get this message?
I am not sure what is different today vs. a couple days ago but I was not able to replicate the gtk_tree_model_get_path assertion. I am still not able to set a breakpoint in the fortran code. The GDB command option was greyed out while in a fortran source file.
That said, I have modified my source to accept a command line argument that is the working directory. For now, this has fixed any issues I have.
Thanks for your help.
________________________________ From: users-bounces@lists.geany.org [users-bounces@lists.geany.org] On Behalf Of Dimitar Zhekov [dimitar.zhekov@gmail.com] Sent: Thursday, July 11, 2013 11:49 AM To: Geany general discussion list Subject: Re: [Geany-Users] set working directory for debug
On Tue, 9 Jul 2013 07:08:54 -0500 "Drake, Johnathan" johnathan.drake@mtsi-va.com wrote:
My simulation is a mixed language C++/FORTRAN. In order to get a breakpoint in the C++ code, I had to right-click in the breakpoint window because the breakpoint button in the menu bar was greyed out.
Acknowledged. Debug -> Toggle breakpoint, and any keybinding to this functon, should work properly too.
Also, I cannot set a breakpoint in my FORTRAN code at all (at least by any method that I am aware of). I can however break in the C++ code where the FORTRAN is called and step-in although I can't use the locals or watch windows once into the FORTRAN code.
Acknowledged. You can try to switch to the other Fortran type, if that doesn't mess the highlighting (I haven't noticed there are two).
The certain way to set any breakpoint disregarding the Scope rules is to invoke Debug -> GDB Command and enter "break filename:line", "break <function>", "-break-insert filename:line", or any other gdb syntax. If your GDB is recent enough, the new breakpoint will be automatically placed in the Breakpoints list. Otherwise, right click and Refresh it.
Also when using scope, I am getting the following messages in the terminal window where geany was launched:
Gtk-CRITICAL **: gtk_tree_model_get_path: assertion 'iter != NULL' failed
Can you describe in brief the sequence of actions to get this message?
-- E-gards: Jimmy _______________________________________________ Users mailing list Users@lists.geany.org https://lists.geany.org/cgi-bin/mailman/listinfo/users