You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@daffodil.apache.org by "Shanedell (via GitHub)" <gi...@apache.org> on 2023/05/01 14:36:11 UTC

[GitHub] [daffodil-vscode] Shanedell commented on issue #599: 1.3.0-rc1 - Debugger not behaving correctly

Shanedell commented on issue #599:
URL: https://github.com/apache/daffodil-vscode/issues/599#issuecomment-1529781820

   @mbeckerle Going to answer this here. The issue you are seeing is because your launch.json is not setup properly. You had attached this one:
   
   ```json
   {
       // Use IntelliSense to learn about possible attributes.
       // Hover to view descriptions of existing attributes.
       // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
       "version": "0.2.0",
       "configurations": [
           {
               "type": "dfdl",
               "request": "launch",
               "name": "pcap dns",
               "program": "${workstationFolder}/src/main/resources/com/tresys/pcap/xsd/pcap.dfdl.xsd",
               "stopOnEntry": true,
               "data": "${workstationFolder}/src/test/resources/com/tresys/pcap/data/dns.cap",
               "infosetFormat": "xml",
               "infosetOutput": {
                   "type": "file",
                   "path": "/tmp/pcap-dns-infoset.xml"
               },
               "tdmlConfig": {
                   "action": "none",
                   "name": "${command:AskForTDMLName}",
                   "description": "${command:AskForTDMLDescription}",
                   "path": "${command:AskForTDMLPath}"
               },
               "debugServer": 4711,
               "openHexView": false,
               "openInfosetView": false,
               "openInfosetDiffView": false,
               "daffodilDebugClasspath": "${workstationFolder}/lib_managed/jars/com.owlcyberdefense/dfdl-ethernetip/dfdl-ethernetip-1.2.0.jar",
               "variables": {},
               "tunables": {},
               "dataEditor.omegaEditPort": 9001,
               "dataEditor.logFile": "${workspaceFolder}/dataEditor-${omegaEditPort}.log",
               "dataEditor.logLevel": "info"
           }
       ]
   }
   ```
   
   You mentioned having to set that `tdmlConfig` to get anywhere, but you actually don't have to. The issue you are running into is because you are defining `${workstationFolder}` which is not a variable, you want `${workspaceFolder}` instead.
   
   But when I tried updating that locally it seemed that the `daffodilDebugClasspath` specified caused mine to stay at breakpoint on line 168 of `pcap.dfdl.xsd`. The reason being seems that trying to set breakpoint inside of the JAR file for dfdl-ethernet causes them not to be hit and if you set them during a debug it just finishes running like you mentioned.
   
   But if you have dfdl-ethernet in a directory behind dfdl-pcap try this `.vscode/launch.json`:
   
   ```json
   {
       // Use IntelliSense to learn about possible attributes.
       // Hover to view descriptions of existing attributes.
       // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
       "version": "0.2.0",
       "configurations": [
           {
               "type": "dfdl",
               "request": "launch",
               "name": "pcap dns",
               "program": "${workspaceFolder}/src/main/resources/com/tresys/pcap/xsd/pcap.dfdl.xsd",
               "stopOnEntry": true,
               "data": "${workspaceFolder}/src/test/resources/com/tresys/pcap/data/dns.cap",
               "infosetFormat": "xml",
               "infosetOutput": {
                   "type": "file",
                   "path": "/tmp/pcap-dns-infoset.xml"
               },
               "debugServer": 4711,
               "openHexView": false,
               "openInfosetView": false,
               "openInfosetDiffView": false,
               "daffodilDebugClasspath": "${workspaceFolder}/../dfdl-ethernet/src/main/resources:${workspaceFolder}/../dfdl-ethernet/target/classes",
               "variables": {},
               "tunables": {},
               "dataEditor.omegaEditPort": 9001,
               "dataEditor.logFile": "${workspaceFolder}/dataEditor-${omegaEditPort}.log",
               "dataEditor.logLevel": "info"
           }
       ]
   }
   ```
   
   set the breakpoint on line 168 of `pcap.dfdl.xsd`. Once that breakpoint is hit, step into and set the breakpoints in ethernetIP.dfdl.xsd on 68 and 70, all breakpoints should now work.
   
   Can you ensure this way works so we can narrow down the error to setting break points inside of a JAR file?


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@daffodil.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org