Pelles C > Bug reports

Possible bugs

(1/1)

marovada:
I'm not sure whether these are bugs - I may be doing something wrong.

1.  I break my c file up into parts, eg Main.c & Gui.c and then #include Gui.c in Main.c.  If I put a breakpoint into Gui.c it is ignored.  It is only recognised if I take the whole text in Gui.c and manually put it into Main.c

2.  If I put a breakpoint into Main.c and keep Main.c open in the editor, I get an error if I debug Main.c and the program reaches the breakpoint.  The error is that access is denied to Main.c (presumably because it is already open).

Also, I know that Pelles is only c, not c++, but it would be good if it could still syntax highlight and debug a file with .cpp extension with only c code in it (eg, if I am using more than one ide for different versions of a c program).

Pelle:

--- Quote from: "marovada" ---1.  I break my c file up into parts, eg Main.c & Gui.c and then #include Gui.c in Main.c.  If I put a breakpoint into Gui.c it is ignored.  It is only recognised if I take the whole text in Gui.c and manually put it into Main.c
--- End quote ---

The debug info, emitted by the compiler, will only contain the name of the main source file - never any included files (even if they are *.c). The debugger will never see the filename, and can't set set any breakpoints in this file. (When setting breakpoints in source files, I don't know how it will be used, so I accept all lines and let the debugger sort it out).


--- Quote from: "marovada" ---
2.  If I put a breakpoint into Main.c and keep Main.c open in the editor, I get an error if I debug Main.c and the program reaches the breakpoint.  The error is that access is denied to Main.c (presumably because it is already open).
--- End quote ---

Hm. If I understand you correctly, I have done this many times without a problem. Any additional info you can give me will help...


--- Quote from: "marovada" ---
Also, I know that Pelles is only c, not c++, but it would be good if it could still syntax highlight and debug a file with .cpp extension with only c code in it (eg, if I am using more than one ide for different versions of a c program).
--- End quote ---

This is probably best handled by an add-in. There is a sample in the add-in SDK called vbfile that does syntax color highlighting for Visual Basic files. By changing the keyword list, and some other things, it could work for C++ files (you should even be able to specify build commands for a C++ compiler... ;-) )

Pelle

Navigation

[0] Message Index

Go to full version