apache / apache/daffodil-vscode
DAPSession Hangs When Starting Debugging Session When infosetOutput is an invalid path
- Dominant language
- TypeScript
- Stars
- 18
- Forks
- 33
- Avg merge
- 3d 6h
- Merged PRs (30d)
- 7
Description
### How to replicate
1. Grab a sample DFDL schema and data file (example: https://github.com/DFDLSchemas/GIF/blob/master/src/main/resources/com/mitre/gif/xsd/gif.dfdl.xsd and https://tenor.com/view/shaquille-o-neal-cat-shake-shaking-wiggle-gif-4628548)
2. Create a new launch.json config and use an invalid file path. By invalid, it doesn't resemble a valid filepath that either exists or doesn't exist in the system currently. (For example `C:\test\output.xml` is valid even if you don't have `C:\test\` as a folder on your computer, whereas `>.<` would be invalid.
My launch.json looks like the following
```JSON
{
"version": "0.2.0",
"configurations": [
{
"request": "launch",
"type": "dfdl",
"name": "Wizard Config",
"schema": {
"path": "${command:AskForSchemaName}",
"rootName": null,
"rootNamespace": null
},
"data": "${command:AskForDataName}",
"debugServer": 4711,
"infosetFormat": "xml",
"infosetOutput": {
"type": "file",
"path": "skibidi/skibidi_ohio"
},
"tdmlConfig": {
"action": "generate",
"path": "skibidi/skibidi_ohio",
"name": "undefined",
"description": "undefined"
},
"trace": true,
"stopOnEntry": true,
"useExistingServer": false,
"openDataEditor": false,
"openInfosetView": false,
"openInfosetDiffView": false,
"daffodilDebugClasspath": [],
"dataEditor": {
"port": 6969,
"logging": {
"file": "${workspaceFolder}/dataEditor-${omegaEditPort}.log",
"level": "debug"
}
},
"dfdlDebugger": {
"logging": {
"file": "${workspaceFolder}/daffodil-debugger.log",
"level": "INFO"
}
}
}
]
}
```
Your screen should look like this and should be hanging
### Potential remedy
Have VSCode display an error message if the path doesn't resemble any form of a valid file path and prevent the launch of any DFDL-debugger-related things in the terminal window.
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.