1. debugger

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.

new topic     » topic index » view message » categorize

2. Re: debugger

eddo said...

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.

new topic     » goto parent     » topic index » view message » categorize

3. Re: debugger

jimcbrown said...

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".

new topic     » goto parent     » topic index » view message » categorize

4. Re: debugger

eddo said...

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

new topic     » goto parent     » topic index » view message » categorize

5. Re: debugger

petelomax said...
jimcbrown said...

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.

new topic     » goto parent     » topic index » view message » categorize

6. Re: debugger

jimcbrown said...

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

new topic     » goto parent     » topic index » view message » categorize

7. Re: debugger

petelomax said...
jimcbrown said...

I did not.

My bad.

No biggie.

petelomax said...

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.

new topic     » goto parent     » topic index » view message » categorize

Search



Quick Links

User menu

Not signed in.

Misc Menu