Re: [Vala] How to debug vala program?



Hi,

2009/10/8 Frederik <scumm_fredo gmx net>:
Jürg Billeter wrote:
On Wed, 2009-09-30 at 08:25 +0000, John - wrote:
I try to debug Vala program with Nemiver :
http://projects.gnome.org/nemiver , that It recomends in Debugging
chapter from http://live.gnome.org/Vala/Tutorial

But It give me this message : "Could not find file test.vala.c" when I
try to see what happens in clicked button signal.

Build your application with valac -g, that way you get debug information
for the .vala source files instead of the generated C files.

Jürg

The problem is that Nemiver still asks for the temporary C files at some
points when stepping through the code, even if the program was compiled
with '-g'.

That's why one must use '-g --save-temps' at the moment. I have no idea why
Nemiver still needs the C files.

Sometimes, valac feels that a C statement is unrepresented in vala,
and writes it as it was in the temp file. This may be better than
having the debugger advance and go back, which is confusing. As an
example consider this: (A and B compile to A' and B', and C, D are
statements that don't map directly to vala).

file.vala
...
10 A
11 B
...

file.vala.c
...
#line file.vala 10
A'
C
D
#line file.vala 11
B'

when executing C and D, gdb would point to line 11 and 12
respectively, and then executing B', it goes back to 11 (this is
mostly confusing in loops).
That's why it has been changed to point to file.vala.c for C and D.

(I feel this is counter-intuitive, I'm trying to look at what can be
done to fold the statements in one line)

Abderrahim



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]