Difference between revisions of "VMS IDE Debugger"

From VSI OpenVMS Wiki
Jump to: navigation, search
(Important Notes)
 
(9 intermediate revisions by 4 users not shown)
Line 17: Line 17:
 
: * Breakpoints can be toggled by clicking on the '''Editor''' margin or using <code>F9</code> on the current line.
 
: * Breakpoints can be toggled by clicking on the '''Editor''' margin or using <code>F9</code> on the current line.
 
: * Variable values can be seen by hovering over variables in the code.
 
: * Variable values can be seen by hovering over variables in the code.
; [7] DEBUG CONSOLE : Shows debugging output. Opens automatically as soon as debugging session starts.  
+
; [7] DEBUG CONSOLE : Shows debugging output. Opens automatically as soon as debugging session starts. All program output will be on this screen. If the program requires data input, enter it in the Debug Console REPL.
 +
 
 +
=Important Notes=
 +
'''Note''' The debugger uses two terminals - one for the program being debugged and one for the debugger itself. Therefore the user has to have additional privileges: LOG_IO, PHY_IO, SHARE and OPER.
 +
 
 +
If you cannot set breakpoints in the source file please check the language mode of the source file (see image).
 +
[[File:Lang-mode.png|200px|thumb|none|Language mode]]
 +
 
 +
== Supported Languages ==
 +
Only the following languages are supported (case sensitive):
 +
* c
 +
* cpp
 +
* cobol
 +
* fortran
 +
* pascal
 +
* bliss
 +
* vms-basic
 +
* java
 +
* kotlin
 +
* scala
 +
 
 +
According to the '''breakpoints''' section in the 'package.json' file:
 +
<pre>
 +
"breakpoints": [
 +
    {
 +
        "language": "c"
 +
    },
 +
    {
 +
        "language": "cpp"
 +
    },
 +
    {
 +
        "language": "bliss"
 +
    },
 +
    {
 +
        "language": "vms-basic"
 +
    },
 +
    {
 +
        "language": "cobol"
 +
    },
 +
    {
 +
        "language": "pascal"
 +
    },
 +
    {
 +
        "language": "fortran"
 +
    },
 +
    {
 +
        "language": "kotlin"
 +
    },
 +
    {
 +
        "language": "scala"
 +
    },
 +
    {
 +
        "language": "java"
 +
    }
 +
]
 +
</pre>
  
 
=Additional Information=
 
=Additional Information=
Please view [https://code.visualstudio.com/docs/editor/debugging Visual Studio Code documentation] to learn more about Debbuger view and debugging process in Visual Studio Code.
+
Please view [https://code.visualstudio.com/docs/editor/debugging Visual Studio Code documentation] to learn more about Debbuger view and debugging process in Visual Studio Code.<br>
 +
 
 +
[https://www.youtube.com/watch?v=CjUciv1Da6Y&list=PLewDXk9a8laO3cAZFPyZ4bbgcKsJ1qgPo&index=4 Video tutorial: VMS IDE 4 Debugging a Project]
  
 
[[Category:VMS IDE]]
 
[[Category:VMS IDE]]

Latest revision as of 04:10, 10 July 2020

VMS IDE uses Visual Studio Code built-in debugger and supports all of its features.

Features

VMS IDE Debugger
[1] VARIABLES 
Shows local variables. If the panel is collapsed, variables are not requested. When debugging, you can set variable values by double-clicking them and typing a new value.
[2] WATCH
You can add variable names (expressions) to set watchpoints:
* Expression without braces "()" - request variable value (local or global);
* Expression with empty braces "()" - enable watchpoint, for example x();
* Expression with conditional expression in braces "(when ...)" - enable watchpoint with condition, for example x(when (x<5)).
[3] CALL STACK 
Shows stack frames. Variables and expressions listed in VARIABLES and WATCH sections are relative to the selected stack frame.
[4] BREAKPOINTS 
Shows breakpoints set for the current project.
[5] DEBUG TOOLBAR 
Provides standard debugging actions. Edit field stopOnEntry in the launch.json file:
  • Set field "stopOnEntry" = true to enable stop on entry.
  • Set field "stopOnEntry" = false to disable stop on entry.
[6] EDITOR 
* Breakpoints can be toggled by clicking on the Editor margin or using F9 on the current line.
* Variable values can be seen by hovering over variables in the code.
[7] DEBUG CONSOLE 
Shows debugging output. Opens automatically as soon as debugging session starts. All program output will be on this screen. If the program requires data input, enter it in the Debug Console REPL.

Important Notes

Note The debugger uses two terminals - one for the program being debugged and one for the debugger itself. Therefore the user has to have additional privileges: LOG_IO, PHY_IO, SHARE and OPER.

If you cannot set breakpoints in the source file please check the language mode of the source file (see image).

Language mode

Supported Languages

Only the following languages are supported (case sensitive):

  • c
  • cpp
  • cobol
  • fortran
  • pascal
  • bliss
  • vms-basic
  • java
  • kotlin
  • scala

According to the breakpoints section in the 'package.json' file:

"breakpoints": [
    {
        "language": "c"
    },
    {
        "language": "cpp"
    },
    {
        "language": "bliss"
    },
    {
        "language": "vms-basic"
    },
    {
        "language": "cobol"
    },
    {
        "language": "pascal"
    },
    {
        "language": "fortran"
    },
    {
        "language": "kotlin"
    },
    {
        "language": "scala"
    },
    {
        "language": "java"
    }
]

Additional Information

Please view Visual Studio Code documentation to learn more about Debbuger view and debugging process in Visual Studio Code.

Video tutorial: VMS IDE 4 Debugging a Project