1. debugger
- Posted by eddo Dec 01, 2012
- 1086 views
Hi - I'm pretty new to euphoria and have a question on the debugger: I've used it before with no problem so don't really know what's going on. Anyway, does anyone know of some reasons why euphoria would leave debug mode? I have a routine which calls a subroutine. I turn the debugger on in my routine with the usual "with trace", and "trace(1)" - works fine. Goes into debug mode just like it's supposed to. Then I go past the call to my subroutine: it immediately comes out of debug mode and back to regular mode. WHY? I've tried putting "trace(1)'s" in the subroutine - doesn't do ANYTHING! What are all the obvious things that could make it behave this way - as I figure it must be something obvious that I am missing because I'm so new to the language! I can partially get around it by using plenty of write-to-screens, but this is very tedious, as you can imagine. I'm certainly doing something quite stupid, so I thought I'd post a question on general reasons why euphoria comes out of debug mode as a first step in correcting this.
2. Re: debugger
- Posted by jimcbrown (admin) Dec 01, 2012
- 1096 views
Hi - I'm pretty new to euphoria and have a question on the debugger: I've used it before with no problem so don't really know what's going on. Anyway, does anyone know of some reasons why euphoria would leave debug mode? I have a routine which calls a subroutine. I turn the debugger on in my routine with the usual "with trace", and "trace(1)" - works fine. Goes into debug mode just like it's supposed to. Then I go past the call to my subroutine: it immediately comes out of debug mode and back to regular mode. WHY? I've tried putting "trace(1)'s" in the subroutine - doesn't do ANYTHING! What are all the obvious things that could make it behave this way - as I figure it must be something obvious that I am missing because I'm so new to the language! I can partially get around it by using plenty of write-to-screens, but this is very tedious, as you can imagine. I'm certainly doing something quite stupid, so I thought I'd post a question on general reasons why euphoria comes out of debug mode as a first step in correcting this.
Can you paste your source code?
One thing which comes to mind is that, at least in older versions of Euphoria, if you include a file, then add a 'with trace' after that line, then the included file will have tracing off (and you won't be able to trace any subroutines and such inside that file). This was actually a feature - so you could group your include statements and trace your own libraries to debug them but avoid tracing hundredds or thousands of lines of code in the standard library or in a stable third party library.
3. Re: debugger
- Posted by petelomax Dec 01, 2012
- 1046 views
if you include a file, then add a 'with trace' after that line, then the included file will have tracing off
I think you meant "if you include a file that has 'without trace' at the top".
4. Re: debugger
- Posted by useless_ Dec 01, 2012
- 1039 views
Hi - I'm pretty new to euphoria and have a question on the debugger: I've used it before with no problem so don't really know what's going on. Anyway, does anyone know of some reasons why euphoria would leave debug mode? I have a routine which calls a subroutine. I turn the debugger on in my routine with the usual "with trace", and "trace(1)" - works fine. Goes into debug mode just like it's supposed to. Then I go past the call to my subroutine: it immediately comes out of debug mode and back to regular mode. WHY? I've tried putting "trace(1)'s" in the subroutine - doesn't do ANYTHING! What are all the obvious things that could make it behave this way - as I figure it must be something obvious that I am missing because I'm so new to the language! I can partially get around it by using plenty of write-to-screens, but this is very tedious, as you can imagine. I'm certainly doing something quite stupid, so I thought I'd post a question on general reasons why euphoria comes out of debug mode as a first step in correcting this.
Put "with trace" at the top of any file you wish to debug. You can then put trace(1) anywhere below that.
Once my "subroutines" are debugged, i remove the "with trace" from the top, and put it below the "subroutines", that way the debugger does not show the "subroutines" executing.
useless
5. Re: debugger
- Posted by jimcbrown (admin) Dec 02, 2012
- 1000 views
if you include a file, then add a 'with trace' after that line, then the included file will have tracing off
I think you meant "if you include a file that has 'without trace' at the top".
I did not. I meant....
include get.e with trace trace(1) ? get(0)
in which case you won't be able to trace get().
Both would cause the issue seen here.
6. Re: debugger
- Posted by petelomax Dec 02, 2012
- 986 views
I did not.
My bad.
Anyway, if I get something that won't trace I put a with trace just above the problem routine. A quick search of the Edita sources yielded 140 of them scattered about.
Pete
7. Re: debugger
- Posted by jimcbrown (admin) Dec 02, 2012
- 1004 views
I did not.
My bad.
No biggie.
Anyway, if I get something that won't trace I put a with trace just above the problem routine. A quick search of the Edita sources yielded 140 of them scattered about.
Pete
Simple, yet sound advice.