codefori / vscode-ibmi

🌍 IBM i development extension for VS Code
https://codefori.github.io/docs/#/
MIT License
288 stars 95 forks source link

Debug closes original source #2314

Open JonFP opened 1 month ago

JonFP commented 1 month ago

When running the debugger the original source is closed when the debugger terminates. This didn't used to happen and forces me to reopen the source after each debug run.


⚠️ REMOVE THIS LINE AND ANY SENSITIVE INFORMATION BELOW! ⚠️

Context Version
Code for IBM i version 2.13.5
Visual Studio Code version 1.94.2
Operating System darwin_x64
Active extensions ``` COBOL (cobol): 24.10.26 Code for IBM i Walkthroughs (vscode-ibmi-walkthroughs): 0.5.0 Configuration Editing (configuration-editing): 1.0.0 Db2 for IBM i (vscode-db2i): 1.6.1 Emmet (emmet): 1.0.0 Error Lens (errorlens): 3.20.0 Extension Authoring (extension-editing): 1.0.0 Git (git): 1.0.0 Git Base (git-base): 1.0.0 GitHub (github): 0.0.1 IBM i Debug (ibmidebug): 2.0.1 JSON Language Features (json-language-features): 1.0.0 Merge Conflict (merge-conflict): 1.0.0 NPM support for VS Code (npm): 1.0.1 Node Debug Auto-attach (debug-auto-launch): 1.0.0 Pylance (vscode-pylance): 2024.10.1 Python (python): 2024.16.1 RPGLE (vscode-rpgle): 0.26.12 Server Ready Action (debug-server-ready): 1.0.0 TODO Highlight (vscode-todo-highlight): 1.0.5 TypeScript and JavaScript Language Features (typescript-language-features): 1.0.0 ```

Remote system |Setting|Value| |-|-| |IBM i OS|V7R4M0| |Tech Refresh|10| |CCSID Origin|37| |Runtime CCSID|37| |Default CCSID|37| |SQL|Enabled |Source dates|Disabled ### Enabled features |/QOpenSys/pkgs/bin|/usr/bin|/QSYS.lib/ILEDITOR.lib|/QSYS.LIB|/QIBM/ProdData/IBMiDebugService/bin|/QOpenSys/QIBM/ProdData/JavaVM/jdk80|/QOpenSys/QIBM/ProdData/JavaVM/jdk11|/QOpensys/pkgs/lib/jvm| |-|-|-|-|-|-|-|-| |bash|attr|GETNEWLIBL.PGM|QZDFMDB2.PGM|startDebugService.sh|64bit|64bit|openjdk-11| |chsh|iconv||||||| |git|setccsid||||||| |grep|tar||||||| |ls|||||||| |md5sum|||||||| |sort|||||||| |stat|||||||| |tn5250||||||||
Shell env ```bash BUILDLIB=PARTNER400 CURLIB=PARTNER400 HOME=/home/PARIS HOST=ideveloper LIBLS=CODE4ITEST SAMPLE LIBHTTP SIDDBV2 YAJL QTEMP QGPL LOGIN=paris LOGNAME=paris MAIL=/var/spool/mail/paris OLDPWD=/home/PARIS PATH=/QOpenSys/pkgs/bin:/QOpenSys/usr/bin:/usr/ccs/bin:/QOpenSys/usr/bin/X11:/usr/sbin:.:/usr/bin PWD=/home/PARIS SHELL=/QOpenSys/pkgs/bin/bash SHLVL=1 SSH_CLIENT=10.29.5.11 63375 22 SSH_CONNECTION=10.29.5.11 63375 172.29.5.35 22 TZ=5,M3.2.0,M11.1.0 USER=paris USERNAME=paris WORKDIR=/home/PARIS _=/QOpenSys/pkgs/bin/env ```
Variants ```json { "american": "#@$", "local": "#@$" } ```
Errors ```json [ { "command": "/QOpenSys/usr/bin/qsh", "code": 1, "stderr": "CPD4090: Printer device PRT01 not found. Output queue changed to QPRINT in library QGPL.\nRNS9308: Compilation stopped. Severity 40 errors found in program.\nCPC0904: Data area RETURNCODE created in library QTEMP.\nRNS9310: Compilation failed. Program DIEXAMP1 not created in library PARTNER400.", "cwd": "/home/PARIS" }, { "command": "/QOpenSys/usr/bin/qsh", "code": 1, "stderr": "CPD4090: Printer device PRT01 not found. Output queue changed to QPRINT in library QGPL.\nRNS9308: Compilation stopped. Severity 20 errors found in program.\nCPC0904: Data area RETURNCODE created in library QTEMP.\nRNS9310: Compilation failed. Program DIEXAMP1 not created in library PARTNER400.", "cwd": "/home/PARIS" }, { "command": "/QOpenSys/usr/bin/qsh", "code": 1, "stderr": "CPD4090: Printer device PRT01 not found. Output queue changed to QPRINT in library QGPL.\nRNS9308: Compilation stopped. Severity 30 errors found in program.\nCPC0904: Data area RETURNCODE created in library QTEMP.\nRNS9310: Compilation failed. Program DIEXAMP1 not created in library PARTNER400.", "cwd": "/home/PARIS" } ] ```
mkwan01 commented 1 week ago

The debugger would open source in a new debug editor and it closes the debug editor after the debug session is terminated. Please describe what the editor behavior is like in your own debug session:

  1. Does your debug session reuse an editor that is opened before the debug session?
  2. If yes, please describe whether the source is local or remote.

If possible, please use some screen captures to show the editor area before debug and during debug.

heymchri commented 1 week ago

Hi @mkwan01 , I'm not sure whether this is what the OP sees, but for me, the behavior is as follows:

JonFP commented 1 week ago

That is exactly what is happening @heymchri

Thanks for clarifying.

mkwan01 commented 1 week ago

Thanks @heymchri for the hint. There is no VScode API to tell whether an open editor is a debug editor. We are currently using the short name on a tab label to determine if this name matches an existing debug source file. If the short name matches, then it is considered as a debug editor and we will close it. This solution is not as good. It can match other existing editors with the same base name. We can change the algorithm to match for the full name.

Can you compare the labels on the two editors (one for debug and the other is opened before debug), and let me know whether the full labels are the same? You can hover on an editor tab to see its label. If their labels are still the same, then we will still have problem in the new solution.

heymchri commented 1 week ago

hi @mkwan01 My regular source editor shows this: image The debug editor shows this: image

I also tried this for a source member: Regular source editor: image Debug editor: image

So in both cases, there is a difference in the full label name.

mkwan01 commented 1 week ago

Thanks @heymchri for the information. Can you also capture the Debug Adapter Protocol log from the Debug Console for the first debug session (where the source is located under /home/HEYMCHR)? I want to make sure that my new solution would work for this case. Thanks.

heymchri commented 1 week ago

Hi @mkwan01 - not sure what you mean with the Debug Adapter Protocol log - is this what you're looking for?

From client: evaluate({"expression":"len","frameId":7,"context":"hover","line":55,"column":25,"source":{"adapterData":{"module":"*PGM AEALIB/CRTOBJEDN","part":"CRTOBJEDN"},"name":"/home/HEYMCHR/builds/tools/qclsrc/crtobjedn.clle","path":"/home/HEYMCHR/builds/tools/qclsrc/crtobjedn.clle","sourceReference":1001}})
From client: evaluate({"expression":"&sublength","frameId":7,"context":"hover","line":56,"column":16,"source":{"adapterData":{"module":"*PGM AEALIB/CRTOBJEDN","part":"CRTOBJEDN"},"name":"/home/HEYMCHR/builds/tools/qclsrc/crtobjedn.clle","path":"/home/HEYMCHR/builds/tools/qclsrc/crtobjedn.clle","sourceReference":1001}})
To client: {"type":"response","seq":0,"request_seq":25,"success":false,"command":"evaluate","body":{"error":{"id":"8999","format":"Server: CPF7E12 Identifier does not exist."}}}
To client: {"type":"response","seq":0,"request_seq":26,"success":true,"command":"evaluate","body":{"result":"0            ","variablesReference":0,"namedVariables":0,"type":""}}
From client: evaluate({"expression":"&startpos","frameId":7,"context":"hover","line":57,"column":16,"source":{"adapterData":{"module":"*PGM AEALIB/CRTOBJEDN","part":"CRTOBJEDN"},"name":"/home/HEYMCHR/builds/tools/qclsrc/crtobjedn.clle","path":"/home/HEYMCHR/builds/tools/qclsrc/crtobjedn.clle","sourceReference":1001}})
To client: {"type":"response","seq":0,"request_seq":27,"success":true,"command":"evaluate","body":{"result":"0            ","variablesReference":0,"namedVariables":0,"type":""}}
mkwan01 commented 1 week ago

@heymchri Yes, that is the one I am looking for. Specifically, I want to check the loadedSource event, which looks like the following: To client: {"type":"event","seq":23,"event":"loadedSource","body":{"reason":"new","source":{"adapterData":{"module":"*PGM MERDBGTEST/EDITORTEST","part":"EDITORTEST"},"name":"MERDBGTEST/QRPGLESRC/EDITORTEST.RPGLE","path":"MERDBGTEST/QRPGLESRC/EDITORTEST.RPGLE","sourceReference":1001}}}

Please attach your loadedSource event for the first debug session where the debug source is located under /home/HEYMCHR.

heymchri commented 1 week ago

@mkwan01 The loadedSource event shows:

To client: {"type":"event","seq":23,"event":"loadedSource","body":{"reason":"new","source":{"adapterData":{"module":"*PGM AEALIB/CRTOBJEDN","part":"CRTOBJEDN"},"name":"/home/HEYMCHR/builds/tools/qclsrc/crtobjedn.clle","path":"/home/HEYMCHR/builds/tools/qclsrc/crtobjedn.clle","sourceReference":1001}}}

Full log:

From client: initialize({"clientID":"vscode","clientName":"Visual Studio Code","adapterID":"IBMiDebug","pathFormat":"path","linesStartAt1":true,"columnsStartAt1":true,"supportsVariableType":true,"supportsVariablePaging":true,"supportsRunInTerminalRequest":true,"locale":"en","supportsProgressReporting":true,"supportsInvalidatedEvent":true,"supportsMemoryReferences":true,"supportsArgsCanBeInterpretedByShell":true,"supportsMemoryEvent":true,"supportsStartDebuggingRequest":true,"supportsANSIStyling":true})
To client: {"seq":0,"type":"response","request_seq":1,"command":"initialize","success":true,"body":{"supportsEvaluateForHovers":true,"supportsSetVariable":true,"supportsValueFormattingOptions":true,"supportsModulesRequest":true,"supportTerminateDebuggee":true,"supportsFunctionBreakpoints":true,"supportsConfigurationDoneRequest":true}}
From client: launch({"type":"IBMiDebug","request":"launch","name":"IBM i batch debug: program AEALIB/CRTOBJEDN","user":"HEYMCHR","password":"Vectra18","host":"usalil2c.infor.com","port":"8005","secure":true,"ignoreCertificateErrors":false,"subType":"batch","library":"AEALIB","program":"CRTOBJEDN","startBatchJobCommand":"SBMJOB CMD(AEALIB/CRTOBJEDN OBJ(XA10M7X1O/acecoq0r) STMF('/home/heymchr/builds/xa10/m7x/qrpgmodsrc/acecoq0r.sqlrpgle') OPTION(*EVENTF)) INLLIBL(QGPL QTEMP XA10FLIB AEFLIB AEALIB AMFLIBB AMXLIBB XA10M7X1O CCHLIB HEYMCHR) CURLIB(AEALIB) JOBQ(QSYSNOMAX) MSGQ(*USRPRF) CPYENVVAR(*YES)","updateProductionFiles":true,"trace":true,"workbenchSettings":{"updateProductionFiles":false,"enableDebugTracing":false},"__sessionId":"06fa2276-50f2-429d-8eba-b56448ff2a19"})
To client: {"type":"event","seq":2,"event":"initialized"}
From client: setFunctionBreakpoints({"breakpoints":[]})
To client: {"type":"response","seq":0,"request_seq":3,"success":true,"command":"setFunctionBreakpoints","body":{"breakpoints":[]}}
From client: configurationDone(undefined)
To client: {"type":"response","seq":0,"request_seq":4,"success":true,"command":"configurationDone"}
From client: threads(undefined)
To client: {"type":"response","seq":0,"request_seq":5,"success":true,"command":"threads","body":{"threads":[]}}
To client: {"type":"event","seq":6,"event":"capabilities","body":{"capabilities":{"supportsFunctionBreakpoints":false,"supportsConditionalBreakpoints":true,"supportsHitConditionalBreakpoints":true,"supportsEvaluateForHovers":true,"supportsSetVariable":true,"supportsValueFormattingOptions":true,"supportsModulesRequest":true,"supportsSetExpression":true,"supportsRestartRequest":true,"supportsTerminateRequest":true}}}
To client: {"type":"event","seq":7,"event":"output","body":{"category":"console","output":"EQARD1067I Remote Debug Service has generated the following trace files: \n/QIBM/UserData/IBMIDEBUGSERVICE/startDebugService_workspace/PDT_DAAS_20241120_111429_0705_2_DAP.txt\n/QIBM/UserData/IBMIDEBUGSERVICE/startDebugService_workspace/PDT_DAAS_20241120_111429_0705_2_EPDC.hex\n"}}
EQARD1067I Remote Debug Service has generated the following trace files: 
/QIBM/UserData/IBMIDEBUGSERVICE/startDebugService_workspace/PDT_DAAS_20241120_111429_0705_2_DAP.txt
/QIBM/UserData/IBMIDEBUGSERVICE/startDebugService_workspace/PDT_DAAS_20241120_111429_0705_2_EPDC.hex
To client: {"type":"event","seq":8,"event":"output","body":{"category":"telemetry","data":{"rdsBuildVersion":"unknown","rdsCorePluginVersion":"1.3.3.202310041518","rdsDb2PluginVersion":"unknown","rdsZosPluginVersion":"unknown","engineLabel":"unknown","engineVersion":"unknown"}}}
To client: {"type":"event","seq":9,"event":"thread","body":{"reason":"started","threadId":1}}
To client: {"type":"event","seq":10,"event":"stopped","body":{"reason":"entry","threadId":1,"allThreadsStopped":true}}
To client: {"type":"event","seq":11,"event":"process","body":{"name":"Process: 414982/HEYMCHR/QDFTJOBDI  Program: CRTOBJEDN","isLocalProcess":false,"startMethod":"launch"}}
To client: {"type":"event","seq":12,"event":"module","body":{"reason":"new","module":{"id":1,"name":"*PGM AEALIB/CRTOBJEDN"}}}
From client: threads(undefined)
To client: {"type":"response","seq":0,"request_seq":6,"success":true,"command":"threads","body":{"threads":[{"id":1,"name":"Thread:1 (stopped)"}]}}
From client: stackTrace({"threadId":1,"startFrame":0,"levels":20})
To client: {"type":"response","seq":0,"request_seq":7,"success":true,"command":"stackTrace","body":{"stackFrames":[{"id":7,"name":"CRTOBJEDN : CRTOBJEDN : CRTOBJEDN","line":1,"column":1,"source":{"adapterData":{"module":"*PGM AEALIB/CRTOBJEDN","part":"CRTOBJEDN"},"name":"/home/HEYMCHR/builds/tools/qclsrc/crtobjedn.clle","path":"/home/HEYMCHR/builds/tools/qclsrc/crtobjedn.clle","sourceReference":1001}},{"id":6,"name":"_CL_PEP : CRTOBJEDN : CRTOBJEDN","line":1,"column":1,"source":{"adapterData":{"module":"*PGM AEALIB/CRTOBJEDN","part":"CRTOBJEDN"},"name":"/home/HEYMCHR/builds/tools/qclsrc/crtobjedn.clle","path":"/home/HEYMCHR/builds/tools/qclsrc/crtobjedn.clle","sourceReference":1001}},{"id":5,"name":"QCAPCMD : QCAPCMD : QCAPCMD","line":1,"column":1,"source":{"adapterData":{"module":"*PGM QSYS/QCAPCMD","part":"QCAPCMD"},"name":"QCAPCMD.STATEMENT","path":"QCAPCMD.STATEMENT","sourceReference":2001}},{"id":4,"name":"ProcessCommand : QRSEEXEC : EVFCEXEC","line":1,"column":1,"source":{"adapterData":{"module":"*PGM QDEVTOOLS/QRSEEXEC","part":"EVFCEXEC"},"name":"EVFCEXEC.STATEMENT","path":"EVFCEXEC.STATEMENT","sourceReference":3001}},{"id":3,"name":"main : QRSEEXEC : EVFCEXEC","line":1,"column":1,"source":{"adapterData":{"module":"*PGM QDEVTOOLS/QRSEEXEC","part":"EVFCEXEC"},"name":"EVFCEXEC.STATEMENT","path":"EVFCEXEC.STATEMENT","sourceReference":3001}},{"id":2,"name":"_C_pep : QRSEEXEC : EVFCEXEC","line":1,"column":1,"source":{"adapterData":{"module":"*PGM QDEVTOOLS/QRSEEXEC","part":[...]
To client: {"type":"event","seq":15,"event":"module","body":{"reason":"new","module":{"id":3,"name":"*PGM QSYS/QCAPCMD"}}}
To client: {"type":"event","seq":16,"event":"module","body":{"reason":"new","module":{"id":4,"name":"*PGM QDEVTOOLS/QRSEEXEC"}}}
To client: {"type":"event","seq":17,"event":"module","body":{"reason":"new","module":{"id":6,"name":"*PGM QSYS/QCMD"}}}
To client: {"type":"event","seq":18,"event":"capabilities","body":{"capabilities":{"supportsFunctionBreakpoints":false,"supportsConditionalBreakpoints":true,"supportsHitConditionalBreakpoints":true,"supportsEvaluateForHovers":true,"supportsSetVariable":true,"supportsValueFormattingOptions":true,"supportsModulesRequest":true,"supportsSetExpression":true,"supportsRestartRequest":true,"supportsTerminateRequest":true}}}
To client: {"type":"event","seq":19,"event":"output","body":{"category":"console","output":"EQARD1067I Remote Debug Service has generated the following trace files: \n/QIBM/UserData/IBMIDEBUGSERVICE/startDebugService_workspace/PDT_DAAS_20241120_111429_0705_2_DAP.txt\n/QIBM/UserData/IBMIDEBUGSERVICE/startDebugService_workspace/PDT_DAAS_20241120_111429_0705_2_EPDC.hex\n/QIBM/UserData/IBMIDEBUGSERVICE/startDebugService_workspace/PDT_DAAS_20241120_111429_0705_2_LOG.log\n"}}
EQARD1067I Remote Debug Service has generated the following trace files: 
/QIBM/UserData/IBMIDEBUGSERVICE/startDebugService_workspace/PDT_DAAS_20241120_111429_0705_2_DAP.txt
/QIBM/UserData/IBMIDEBUGSERVICE/startDebugService_workspace/PDT_DAAS_20241120_111429_0705_2_EPDC.hex
/QIBM/UserData/IBMIDEBUGSERVICE/startDebugService_workspace/PDT_DAAS_20241120_111429_0705_2_LOG.log
To client: {"type":"response","seq":0,"request_seq":2,"success":true,"command":"launch"}
From client: source({"sourceReference":1001,"source":{"adapterData":{"module":"*PGM AEALIB/CRTOBJEDN","part":"CRTOBJEDN"},"name":"/home/HEYMCHR/builds/tools/qclsrc/crtobjedn.clle","path":"/home/HEYMCHR/builds/tools/qclsrc/crtobjedn.clle","sourceReference":1001}})
From client: threads(undefined)
To client: {"type":"response","seq":0,"request_seq":9,"success":true,"command":"threads","body":{"threads":[{"id":1,"name":"Thread:1 (stopped)"}]}}
To client: {"type":"response","seq":0,"request_seq":8,"success":true,"command":"source","body":{"content":"pgm parm(&qualobj &fullpath &options)\n \ndcl &qualobj      *char 20\ndcl &fullpath     *char 200\ndcl &options      *char 10\n \ndcl &name         *char 10\ndcl &buildlib     *char 10\n \ndcl &app          *char  3\ndcl &obj          *char 10\ndcl &objtype      *char 10\ndcl &chglvl       *char  1\ndcl &cmplib       *char 10\ndcl &dstlib       *char 10\ndcl &srcstmf      *char 200\n \ndcl &startpos     *int\ndcl &found        *int\ndcl &length       *int\ndcl &sublength    *int\ndcl &mbrtype      *char 10\ndcl &env          *char  4\ndcl &objdesc      *char 50\ndcl &otlib        *char 10\ndcl &objown       *char 10\ndcl &pubaut       *char 10\ndcl &runprf       *char 10\ndcl &ismodule     *int\n \nchgvar &name      value(%sst(&qualobj 1 10))\nchgvar &buildlib  value(%sst(&qualobj 11 10))\n \n \n \n \nchgvar &env *blanks\nchgvar &found %scan('/builds/' &fullpath)\nif (&found > 0) then(do)\n \n    /* set the LDA environment value based on the path of the streamfile */\n    /* set the APP parameter based on the path of the streamfile         */\n    /* example: '/home/heymchr/builds/xa10/m7x/rpglesrc/amvt0.rpgle'     */\n    chgvar &startpos (&found + 8)\n    chgvar &env %substring(&fullpath &startpos 4)\n    chgvar &env %upper(&env)\n    chgdtaara dtaara(*lda (1 4)) value(&env)\n    chgvar &startpos (&found + 13)\n    chgvar &app %substring(&fullpath &startpos 3)\n    chg[...]
To client: {"type":"event","seq":23,"event":"loadedSource","body":{"reason":"new","source":{"adapterData":{"module":"*PGM AEALIB/CRTOBJEDN","part":"CRTOBJEDN"},"name":"/home/HEYMCHR/builds/tools/qclsrc/crtobjedn.clle","path":"/home/HEYMCHR/builds/tools/qclsrc/crtobjedn.clle","sourceReference":1001}}}
From client: scopes({"frameId":7})
From client: evaluate({"expression":"&qualobj","frameId":7,"context":"watch"})
From client: evaluate({"expression":"&fullpath","frameId":7,"context":"watch"})
From client: evaluate({"expression":"&app","frameId":7,"context":"watch"})
From client: evaluate({"expression":"&obj","frameId":7,"context":"watch"})
From client: evaluate({"expression":"&chglvl","frameId":7,"context":"watch"})
From client: evaluate({"expression":"&cmplib","frameId":7,"context":"watch"})
From client: evaluate({"expression":"&dstlib","frameId":7,"context":"watch"})
From client: evaluate({"expression":"&igc","frameId":7,"context":"watch"})
From client: evaluate({"expression":"&startpos","frameId":7,"context":"watch"})
From client: evaluate({"expression":"&edn","frameId":7,"context":"watch"})
To client: {"type":"response","seq":0,"request_seq":10,"success":true,"command":"scopes","body":{"scopes":[{"name":"Locals","variablesReference":71000000,"expensive":false}]}}
To client: {"type":"response","seq":0,"request_seq":11,"success":true,"command":"evaluate","body":{"result":"ACECOQ0R  XA10M7X1O ","variablesReference":0,"namedVariables":0,"type":""}}
To client: {"type":"response","seq":0,"request_seq":12,"success":true,"command":"evaluate","body":{"result":"/home/heymchr/builds/xa10/m7x/qrpgmodsrc/acecoq0r.sqlrpgle                                                                                                                                              ","variablesReference":0,"namedVariables":0,"type":""}}
To client: {"type":"response","seq":0,"request_seq":13,"success":true,"command":"evaluate","body":{"result":"   ","variablesReference":0,"namedVariables":0,"type":""}}
To client: {"type":"response","seq":0,"request_seq":14,"success":true,"command":"evaluate","body":{"result":"          ","variablesReference":0,"namedVariables":0,"type":""}}
To client: {"type":"response","seq":0,"request_seq":15,"success":true,"command":"evaluate","body":{"result":" ","variablesReference":0,"namedVariables":0,"type":""}}
To client: {"type":"response","seq":0,"request_seq":16,"success":true,"command":"evaluate","body":{"result":"          ","variablesReference":0,"namedVariables":0,"type":""}}
To client: {"type":"event","seq":31,"event":"output","body":{"category":"console","output":"Server: CPF7E12 Identifier does not exist."}}
Server: CPF7E12 Identifier does not exist.
To client: {"type":"response","seq":0,"request_seq":18,"success":false,"command":"evaluate","body":{"error":{"id":"8999","format":"Server: CPF7E12 Identifier does not exist."}}}
To client: {"type":"response","seq":0,"request_seq":17,"success":true,"command":"evaluate","body":{"result":"          ","variablesReference":0,"namedVariables":0,"type":""}}
To client: {"type":"response","seq":0,"request_seq":19,"success":true,"command":"evaluate","body":{"result":"0            ","variablesReference":0,"namedVariables":0,"type":""}}
To client: {"type":"event","seq":35,"event":"output","body":{"category":"console","output":"Server: CPF7E12 Identifier does not exist."}}
Server: CPF7E12 Identifier does not exist.
To client: {"type":"response","seq":0,"request_seq":20,"success":false,"command":"evaluate","body":{"error":{"id":"8999","format":"Server: CPF7E12 Identifier does not exist."}}}
From client: evaluate({"expression":"&startpos","frameId":7,"context":"hover","line":57,"column":16,"source":{"adapterData":{"module":"*PGM AEALIB/CRTOBJEDN","part":"CRTOBJEDN"},"name":"/home/HEYMCHR/builds/tools/qclsrc/crtobjedn.clle","path":"/home/HEYMCHR/builds/tools/qclsrc/crtobjedn.clle","sourceReference":1001}})
From client: evaluate({"expression":"&sublength","frameId":7,"context":"hover","line":56,"column":16,"source":{"adapterData":{"module":"*PGM AEALIB/CRTOBJEDN","part":"CRTOBJEDN"},"name":"/home/HEYMCHR/builds/tools/qclsrc/crtobjedn.clle","path":"/home/HEYMCHR/builds/tools/qclsrc/crtobjedn.clle","sourceReference":1001}})
To client: {"type":"response","seq":0,"request_seq":21,"success":true,"command":"evaluate","body":{"result":"0            ","variablesReference":0,"namedVariables":0,"type":""}}
To client: {"type":"response","seq":0,"request_seq":22,"success":true,"command":"evaluate","body":{"result":"0            ","variablesReference":0,"namedVariables":0,"type":""}}
From client: evaluate({"expression":"&startpos","frameId":7,"context":"hover","line":57,"column":16,"source":{"adapterData":{"module":"*PGM AEALIB/CRTOBJEDN","part":"CRTOBJEDN"},"name":"/home/HEYMCHR/builds/tools/qclsrc/crtobjedn.clle","path":"/home/HEYMCHR/builds/tools/qclsrc/crtobjedn.clle","sourceReference":1001}})
To client: {"type":"response","seq":0,"request_seq":23,"success":true,"command":"evaluate","body":{"result":"0            ","variablesReference":0,"namedVariables":0,"type":""}}
From client: evaluate({"expression":"&sublength","frameId":7,"context":"hover","line":56,"column":16,"source":{"adapterData":{"module":"*PGM AEALIB/CRTOBJEDN","part":"CRTOBJEDN"},"name":"/home/HEYMCHR/builds/tools/qclsrc/crtobjedn.clle","path":"/home/HEYMCHR/builds/tools/qclsrc/crtobjedn.clle","sourceReference":1001}})
To client: {"type":"response","seq":0,"request_seq":24,"success":true,"command":"evaluate","body":{"result":"0            ","variablesReference":0,"namedVariables":0,"type":""}}
From client: evaluate({"expression":"&startpos","frameId":7,"context":"hover","line":57,"column":16,"source":{"adapterData":{"module":"*PGM AEALIB/CRTOBJEDN","part":"CRTOBJEDN"},"name":"/home/HEYMCHR/builds/tools/qclsrc/crtobjedn.clle","path":"/home/HEYMCHR/builds/tools/qclsrc/crtobjedn.clle","sourceReference":1001}})
To client: {"type":"response","seq":0,"request_seq":25,"success":true,"command":"evaluate","body":{"result":"0            ","variablesReference":0,"namedVariables":0,"type":""}}
From client: evaluate({"expression":"&sublength","frameId":7,"context":"hover","line":56,"column":16,"source":{"adapterData":{"module":"*PGM AEALIB/CRTOBJEDN","part":"CRTOBJEDN"},"name":"/home/HEYMCHR/builds/tools/qclsrc/crtobjedn.clle","path":"/home/HEYMCHR/builds/tools/qclsrc/crtobjedn.clle","sourceReference":1001}})
To client: {"type":"response","seq":0,"request_seq":26,"success":true,"command":"evaluate","body":{"result":"0            ","variablesReference":0,"namedVariables":0,"type":""}}
From client: evaluate({"expression":"&startpos","frameId":7,"context":"hover","line":53,"column":12,"source":{"adapterData":{"module":"*PGM AEALIB/CRTOBJEDN","part":"CRTOBJEDN"},"name":"/home/HEYMCHR/builds/tools/qclsrc/crtobjedn.clle","path":"/home/HEYMCHR/builds/tools/qclsrc/crtobjedn.clle","sourceReference":1001}})
To client: {"type":"response","seq":0,"request_seq":27,"success":true,"command":"evaluate","body":{"result":"0            ","variablesReference":0,"namedVariables":0,"type":""}}
From client: evaluate({"expression":"&length","frameId":7,"context":"hover","line":55,"column":16,"source":{"adapterData":{"module":"*PGM AEALIB/CRTOBJEDN","part":"CRTOBJEDN"},"name":"/home/HEYMCHR/builds/tools/qclsrc/crtobjedn.clle","path":"/home/HEYMCHR/builds/tools/qclsrc/crtobjedn.clle","sourceReference":1001}})
To client: {"type":"response","seq":0,"request_seq":28,"success":true,"command":"evaluate","body":{"result":"0            ","variablesReference":0,"namedVariables":0,"type":""}}
From client: evaluate({"expression":"&startpos","frameId":7,"context":"hover","line":57,"column":16,"source":{"adapterData":{"module":"*PGM AEALIB/CRTOBJEDN","part":"CRTOBJEDN"},"name":"/home/HEYMCHR/builds/tools/qclsrc/crtobjedn.clle","path":"/home/HEYMCHR/builds/tools/qclsrc/crtobjedn.clle","sourceReference":1001}})
To client: {"type":"response","seq":0,"request_seq":29,"success":true,"command":"evaluate","body":{"result":"0            ","variablesReference":0,"namedVariables":0,"type":""}}
mkwan01 commented 1 week ago

Thanks @heymchri . The DAP log confirms that the name field of the loadedSource event contains the full path of the source file in the IFS debug scenario.

JonFP commented 1 week ago

Just a thought - this appears to have been a recently introduced problem - so how did it work before?

mkwan01 commented 1 week ago

The old behaviour is to close the currently active editor, even if the active editor is not for the current debug session. This solution also has its own set of problems. We will try to fix the problem by matching the full path of the source tab against the loaded debug source files.

mkwan01 commented 6 days ago

The fix will be available in the coming debug client update (around early December).