1. Euphoria 4.0 debugger

Hi,

I'm sorry if this has already been discussed and I missed it, but can anyone please tell me whether in v4.0 the euphoria debugger has a easier way to view the contents of a string.

In other words instead of seeing this when you type ?URL

URL={104h,116t,116t,112p,58:,47/,47/,111o,112p,101e,110n,101e,117u,112p,104h, 111o,114r,105i,97a,46.,111o,114r,103g}

Perhaps a method by which it would be possible to see this...

URL = "http://openeuphoria.org"

Perhaps via another command, e.g. s?URL (string query) or something similar.

Cheers,
Mark

new topic     » topic index » view message » categorize

2. Re: Euphoria 4.0 debugger

marky1124 said...

Hi,

I'm sorry if this has already been discussed and I missed it, but can anyone please tell me whether in v4.0 the euphoria debugger has a easier way to view the contents of a string.

In other words instead of seeing this when you type ?URL

URL={104h,116t,116t,112p,58:,47/,47/,111o,112p,101e,110n,101e,117u,112p,104h, 111o,114r,105i,97a,46.,111o,114r,103g}

Perhaps a method by which it would be possible to see this...

URL = "http://openeuphoria.org"

Perhaps via another command, e.g. s?URL (string query) or something similar.

Cheers,
Mark

No not that I know of.

from 4.0 MANUAL said...

For your convenience, numbers that are in the range of printable ASCII characters (32-127) are displayed along with the ASCII character itself. The ASCII character will be in a different color (or in quotes in a mono display). This is done for all variables, since Euphoria does not know in general whether you are thinking of a number as an ASCII character or not. You will also see ASCII characters (in quotes) in ex.err. This can make for a rather "busy" display, but the ASCII information is often very useful.

Here is link to 4.0 Manual

Mark you could use the ' ! ' command to dump your program
and look at the ex.err program.
Another thing to do is to insert a sequence variable in
your code and set the sequence variable = to the
sequence you want to look at and use the ' ? ' command to view
the sequence ( which displays in pretty print mode ).

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

3. Re: Euphoria 4.0 debugger

Hi Bernie,

Thank you for your reply. I fear that you have misunderstood my request. I know how to view the contents of a sequence and how it is displayed with both the numeric value and the ascii character per byte. My request is to have a method to tell the debugger to display the sequence as an ascii string.

For example take this Euphoria code

with trace 
sequence URL 
URL = "http://openeuphoria.org" 
trace(1) 
? 1/0 

Now in the debugger when I type ?URL it displays

URL={104h,116t,116t,112p,58:,47/,47/,111o,112p,101e,110n,101e,117u,112p,104h, 
111o,114r,105i,97a,46.,111o,114r,103g} 

which is also how it is displayed in the ex.err file. I am asking for a way in which to ask the debugger to display it as

URL = "http://openeuphoria.org" 

Cheers,
Mark

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

4. Re: Euphoria 4.0 debugger

I guess the difficulty is in determining if the sequence is indeed an ascii string, or say, a list of weights of the people coming through the lunch line:

URL     = "http://openeuphoria.org" 
Weights = {104, 116, 116, 112 ,58, 47, 47, 111, 112, 101, 110, 101, 117, 112, 104,  
    111, 114, 105, 97, 46, 111, 114, 103} 

Jeremy

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

5. Re: Euphoria 4.0 debugger

jeremy said...

I guess the difficulty is in determining if the sequence is indeed an ascii string, or say, a list of weights of the people coming through the lunch line:

URL     = "http://openeuphoria.org" 
Weights = {104, 116, 116, 112 ,58, 47, 47, 111, 112, 101, 110, 101, 117, 112, 104,  
    111, 114, 105, 97, 46, 111, 114, 103} 

Jeremy

Jeremy:
I looked in the source but I can't figure out how trace displays
Isn't there a way we could switch pretty_print options with some
special key when using the '?' command on a sequence. The manual
says that '?' cmd uses pretty_print.

PS: I guess we can always close are right eye when looking at
sequences with trace.

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

6. Re: Euphoria 4.0 debugger

bernie said...

Jeremy:
I looked in the source but I can't figure out how trace displays
Isn't there a way we could switch pretty_print options with some
special key when using the '?' command on a sequence. The manual
says that '?' cmd uses pretty_print.

Bernie, I am not well versed at all on the debugger, I'll let Matt, Derek, Jim or Shawn answer this question.

bernie said...

PS: I guess we can always close are right eye when looking at
sequences with trace.

Ha! I had to wait a minute to stop laughing before I answered this. Too funny.

Jeremy

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

7. Re: Euphoria 4.0 debugger

jeremy said...
bernie said...

I looked in the source but I can't figure out how trace displays
Isn't there a way we could switch pretty_print options with some
special key when using the '?' command on a sequence. The manual
says that '?' cmd uses pretty_print.

Bernie, I am not well versed at all on the debugger, I'll let Matt, Derek, Jim or Shawn answer this question.

The file to look at is be_rterror.c, and probably DisplayVar() is a good place to start. I haven't worked with the internal debugger, though improving that and attaching an external debugger is something that we're probably going to do in the future.

Matt

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

8. Re: Euphoria 4.0 debugger

jeremy said...

I guess the difficulty is in determining if the sequence is indeed an ascii string, or say, a list of weights of the people coming through the lunch line:

URL     = "http://openeuphoria.org" 
Weights = {104, 116, 116, 112 ,58, 47, 47, 111, 112, 101, 110, 101, 117, 112, 104,  
    111, 114, 105, 97, 46, 111, 114, 103} 

Jeremy



Hmm, smells like a string type to me!

If it's a sequence, print it like URL={104h,116t,116t,112p, etc

If it's a string, print it like URL = "http etc

useless

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

9. Re: Euphoria 4.0 debugger

Kat said...
jeremy said...

I guess the difficulty is in determining if the sequence is indeed an ascii string, or say, a list of weights of the people coming through the lunch line:

URL     = "http://openeuphoria.org" 
Weights = {104, 116, 116, 112 ,58, 47, 47, 111, 112, 101, 110, 101, 117, 112, 104,  
    111, 114, 105, 97, 46, 111, 114, 103} 

Jeremy

Hmm, smells like a string type to me!

If it's a sequence, print it like URL={104h,116t,116t,112p, etc

If it's a string, print it like URL = "http etc

Isn't the point that Euphoria can't tell the difference between a list of integers that fall in the ASCII range, and a string. How does Euphoria know how {100, 101, 114, 101, 107} is meant to be interpreted as? Is it "derek" or a set of integers?

I think the best option at this point is to have another trace command like '?', that prints the variable as a string if it can otherwise display it in sequence notation.

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

10. Re: Euphoria 4.0 debugger

Good suggestion, can I add something?
It could also display consecutive printeable characters and denote others that are not, for example:

  • We have a string that starts with a tab character: {9},"this a string starting with a tab"
  • We have a word separated by a tabulator: "column A",{9},"column b"
  • A string that actually ends with crlf: "a line",{13},{10}

    Cheers, Guillermo
new topic     » goto parent     » topic index » view message » categorize

11. Re: Euphoria 4.0 debugger

gbonvehi said...

Good suggestion, can I add something?
It could also display consecutive printeable characters and denote others that are not, for example:

  • We have a string that starts with a tab character: {9},"this a string starting with a tab"
  • We have a word separated by a tabulator: "column A",{9},"column b"
  • A string that actually ends with crlf: "a line",{13},{10}

If we're attempting to display it as a string, then I'd prefer to escape those:

    "\tthis is a string starting with a tab" 
    "a line\r\n" 

Matt

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

12. Re: Euphoria 4.0 debugger

gbonvehi said...

Good suggestion, can I add something?
It could also display consecutive printeable characters and denote others that are not, for example:

  • We have a string that starts with a tab character: {9},"this a string starting with a tab"
  • We have a word separated by a tabulator: "column A",{9},"column b"
  • A string that actually ends with crlf: "a line",{13},{10}

    Cheers, Guillermo

I'd be very happy if you did. As I suggested in my first post I'm not expecting the debugger to decide whether the sequence is an ascii string or not. I'm just looking for the ability, as a human, to ask it to display a sequence as a string.

E.g. s?URL meaning "string query URL", given my assumption that "?URL" means "query URL".

Thank you Guillermo,
Cheers,
Mark

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

Search



Quick Links

User menu

Not signed in.

Misc Menu