Post Reply 
Any hp prime debugger tutorials/docs out there?
08-03-2023, 05:48 AM
Post: #1
Any hp prime debugger tutorials/docs out there?
Hello,
I would like to use the debugger to debug a little program I have but it does not seem to work for me.
I wonder if there are any docs out there on how to use the debugger.
Does anyone know?
Find all posts by this user
Quote this message in a reply
08-03-2023, 04:20 PM
Post: #2
RE: Any hp prime debugger tutorials/docs out there?
(08-03-2023 05:48 AM)nickapos Wrote:  Hello,
I would like to use the debugger to debug a little program I have but it does not seem to work for me.
I wonder if there are any docs out there on how to use the debugger.
Does anyone know?

Hi nickapos,
the debugger is explained on the manual on p. 607. It is the third edition from 2017 (https://www.hpcalc.org/details/7445)
Find all posts by this user
Quote this message in a reply
08-03-2023, 05:09 PM
Post: #3
RE: Any hp prime debugger tutorials/docs out there?
(08-03-2023 04:20 PM)froehlic Wrote:  
(08-03-2023 05:48 AM)nickapos Wrote:  Hello,
I would like to use the debugger to debug a little program I have but it does not seem to work for me.
I wonder if there are any docs out there on how to use the debugger.
Does anyone know?

Hi nickapos,
the debugger is explained on the manual on p. 607. It is the third edition from 2017 (https://www.hpcalc.org/details/7445)

Thank you very much I will look into it.
Find all posts by this user
Quote this message in a reply
08-03-2023, 07:23 PM (This post was last modified: 08-03-2023 08:08 PM by HPCarnace.)
Post: #4
RE: Any hp prime debugger tutorials/docs out there?
There is a command that is not explained in the manual: debug() . This command stops the program and starts the debugger. Example: https://youtu.be/VS7kl8jNKrg
Another thing that is not explained in the manual is #pragma mode( separator( . , ; ) integer(h32) )
More explanation of the MOUSE() command is needed (page 653).
The breakpoint command (page 463) is not fully explained either (I inserted it into my program and it doesn't pause at all)
Find all posts by this user
Quote this message in a reply
08-04-2023, 05:03 AM
Post: #5
RE: Any hp prime debugger tutorials/docs out there?
Bonjour
Le débogueur s'utilise de 2 façons :
1) vous souhaitez déboguer le programme complet alors dans la ligne de commande dans Home vous tapez 'debug(nomprpog)' 'Enter'
2) vous voulez déboguez un endroit précis de vôtre programme, vous insérez debug() dans vôtre code à cet endroit.

Lorsque vous êtes en mode débogueur vous avez un menu assez explicite je pense, sur la partie supérieure de l'écran la ligne inversée est celle en cours d'exécution, sur la partie inférieur en pointant les lignes vous pouvez entrer le nom de variables pour suivre leur évolution.
En espérant que cela vous aide.

Hello
The debugger can be used in 2 ways:
1) you want to debug the whole program, so on the command line in Home you type 'debug(nomprpog)' 'Enter'.
2) If you want to debug a specific part of your programme, insert debug() into your code at that point.

When you're in debug mode you have a fairly self-explanatory menu, I think. On the upper part of the screen the inverted line is the one currently being executed, and on the lower part by pointing to the lines you can enter the names of variables to follow their progress.
I hope this helps.

Sorry for my english
Find all posts by this user
Quote this message in a reply
08-04-2023, 01:09 PM
Post: #6
RE: Any hp prime debugger tutorials/docs out there?
(08-04-2023 05:03 AM)Tyann Wrote:  Bonjour
Le débogueur s'utilise de 2 façons :
1) vous souhaitez déboguer le programme complet alors dans la ligne de commande dans Home vous tapez 'debug(nomprpog)' 'Enter'
2) vous voulez déboguez un endroit précis de vôtre programme, vous insérez debug() dans vôtre code à cet endroit.

Lorsque vous êtes en mode débogueur vous avez un menu assez explicite je pense, sur la partie supérieure de l'écran la ligne inversée est celle en cours d'exécution, sur la partie inférieur en pointant les lignes vous pouvez entrer le nom de variables pour suivre leur évolution.
En espérant que cela vous aide.

Hello
The debugger can be used in 2 ways:
1) you want to debug the whole program, so on the command line in Home you type 'debug(nomprpog)' 'Enter'.
2) If you want to debug a specific part of your programme, insert debug() into your code at that point.

When you're in debug mode you have a fairly self-explanatory menu, I think. On the upper part of the screen the inverted line is the one currently being executed, and on the lower part by pointing to the lines you can enter the names of variables to follow their progress.
I hope this helps.

Hi Tyan, thank you very much for the reply. I have used the debugger before and I can see it go through the code step by step, but I guess I was expecting to see the values of the existing variables on the second part of the display automatically appear.
From what you say I need to type in the variables manually. I will try that and see what happens
Find all posts by this user
Quote this message in a reply
08-04-2023, 11:10 PM
Post: #7
RE: Any hp prime debugger tutorials/docs out there?
(08-04-2023 01:09 PM)nickapos Wrote:  ...but I guess I was expecting to see the values of the existing variables on the second part of the display automatically appear.

This is an annoyance but there may be too many variables and then you end up scrolling for ages to find the one you're interested in.

A useful improvement would be to allow the variables of interest to be specified in the debug() call, so debug(i,j,B) would start the debugger with the current values of i, j and B shown in the lower part of the display.
Find all posts by this user
Quote this message in a reply
08-05-2023, 01:32 AM
Post: #8
RE: Any hp prime debugger tutorials/docs out there?
(08-04-2023 11:10 PM)BruceH Wrote:  
(08-04-2023 01:09 PM)nickapos Wrote:  ...but I guess I was expecting to see the values of the existing variables on the second part of the display automatically appear.

This is an annoyance but there may be too many variables and then you end up scrolling for ages to find the one you're interested in.

A useful improvement would be to allow the variables of interest to be specified in the debug() call, so debug(i,j,B) would start the debugger with the current values of i, j and B shown in the lower part of the display.

Yeah good points. I agree. This is not covered in the manual at all so there is space for improvement there as well.
Find all posts by this user
Quote this message in a reply
Post Reply 




User(s) browsing this thread: 1 Guest(s)