1. Euphoria 4.0 debugger
- Posted by marky1124 Mar 23, 2009
- 817 views
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
2. Re: Euphoria 4.0 debugger
- Posted by bernie Mar 23, 2009
- 857 views
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.
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 ).
3. Re: Euphoria 4.0 debugger
- Posted by marky1124 Mar 24, 2009
- 792 views
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
4. Re: Euphoria 4.0 debugger
- Posted by jeremy (admin) Mar 24, 2009
- 757 views
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
5. Re: Euphoria 4.0 debugger
- Posted by bernie Mar 24, 2009
- 797 views
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.
6. Re: Euphoria 4.0 debugger
- Posted by jeremy (admin) Mar 24, 2009
- 788 views
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.
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
7. Re: Euphoria 4.0 debugger
- Posted by mattlewis (admin) Mar 24, 2009
- 791 views
- Last edited Mar 25, 2009
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
8. Re: Euphoria 4.0 debugger
- Posted by Kat Mar 24, 2009
- 744 views
- Last edited Mar 25, 2009
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
9. Re: Euphoria 4.0 debugger
- Posted by DerekParnell (admin) Mar 25, 2009
- 761 views
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.
10. Re: Euphoria 4.0 debugger
- Posted by gbonvehi Mar 25, 2009
- 761 views
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
11. Re: Euphoria 4.0 debugger
- Posted by mattlewis (admin) Mar 25, 2009
- 748 views
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
12. Re: Euphoria 4.0 debugger
- Posted by marky1124 Mar 25, 2009
- 747 views
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