Closed supert3d closed 1 year ago
Thank you for filing this issue. We appreciate your feedback and will review the issue as soon as possible. Remember, however, that GitHub isn't a mechanism for receiving support under any agreement or SLA. If you require immediate assistance, contact Salesforce Customer Support.
Hello @supert3d :wave: It looks like you didn't include the full Salesforce CLI version information in your issue.
Please provide the output of version --verbose --json
for the CLI you're using (sf
or sfdx
).
A few more things to check:
rc
or nightly
versions. (docs)doctor
command to diagnose common issues.Thank you!
$ sf version --verbose --json
{
"cliVersion": "@salesforce/cli/1.83.0",
"architecture": "win32-x64",
"nodeVersion": "node-v18.15.0",
"osVersion": "Windows_NT 10.0.22621",
"shell": "cmd.exe",
"rootPath": "C:\\Users\\tonyc\\AppData\\Local\\sfdx\\client\\7.205.6-dfc6717\\sf",
"pluginVersions": [
"@oclif/plugin-autocomplete 2.3.0 (core)",
"@oclif/plugin-commands 2.2.15 (core)",
"@oclif/plugin-help 5.2.9 (core)",
"@oclif/plugin-not-found 2.3.24 (core)",
"@oclif/plugin-plugins 3.1.2 (core)",
"@oclif/plugin-search 0.0.17 (core)",
"@oclif/plugin-update 3.1.17 (core)",
"@oclif/plugin-version 1.3.4 (core)",
"@oclif/plugin-warn-if-update-available 2.0.37 (core)",
"@oclif/plugin-which 2.2.22 (core)",
"@salesforce/cli 1.83.0 (core)",
"apex 2.3.3 (core)",
"auth 2.8.1 (core)",
"data 2.3.22 (core)",
"deploy-retrieve 1.11.7 (core)",
"functions 1.21.10 (user)",
"info 2.6.19 (core)",
"limits 2.3.18 (core)",
"login 1.2.11 (core)",
"org 2.9.8 (core)",
"schema 2.3.12 (core)",
"settings 1.4.11 (core)",
"sobject 0.1.24 (core)",
"source 2.10.14 (core)",
"telemetry 2.2.0 (core)",
"templates 55.4.20 (core)",
"trust 2.4.20 (core)",
"user 2.3.17 (core)"
]
}
Those aren't errors, just warnings. the CLI recognizes the both the old and new Env names.
I'll transfer this to the vscode extension repo.
Cheers there @mshanemc - I think, for whatever reason, those warnings in the console stop the VSCode debugger stream. Cheers again!
I'll confirm the vscode extension seems to be treating these warnings as errors.
Connected to Streaming API channel /systemTopic/ApexDebuggerSystemEvent.
Connected to Streaming API channel /systemTopic/ApexDebuggerEvent.
Command returned the following error:
(node:35301) Warning: Deprecated environment variable: SFDX_INSTANCE_URL. Please use SF_ORG_INSTANCE_URL instead.
(Use `node --trace-warnings ...` to show where the warning was created)
(node:35301) Warning: Deprecated environment variable: SFDX_DEFAULTUSERNAME. Please use SF_TARGET_ORG instead.
The apex reply debugger is not working.
I filed case: Case #44888728 Apex replay debugger not compatible with updates to sfdx
@pogilvieCB - Cheers for confirming mate. Could you hyperlink the case you have open for the Apex Replay Debugger? Would 100% agree it's seems to have been with all the recent updates and push to get people to migrate from sfdx
to sf
I'm not able to reproduce this issue.
@supert3d & @pogilvieCB Are you able to run SFDX: Launch Apex Replay Debugger with Current File
command on an Anonymous apex file?
@RitamAgrawal - Yes. Steps used to test:
[file].apex
) SFDX: Launch Apex Replay Debugger with Current File
@pogilvieCB issue is with Apex Replay Debugger. My issue is with Apex Debugger (not replay).
Steps to recreate my issue:
"name": "Launch Apex Debugger",
SFDX: Update Checkpoints in Org
Debug Output:
Connected to Streaming API channel /systemTopic/ApexDebuggerEvent.
Command returned the following error:
(node:1724) Warning: Deprecated environment variable: SFDX_DEFAULTUSERNAME. Please use SF_TARGET_ORG instead.
(Use `node --trace-warnings ...` to show where the warning was created)
(node:1724) Warning: Deprecated environment variable: SFDX_INSTANCE_URL. Please use SF_ORG_INSTANCE_URL instead.```
Then modal to launch `launch.json`
@supert3d & @pogilvieCB Thank you for your clarification in response. I was able to repro it for Apex Debugger and will include this in our current roadmap. Correct me if I'm wrong here, my understanding is:
Heya there @RitamAgrawal 💯 - Awesome and thank you! 🙏🏻
Just popped back to say thanks all for getting this resolved! Working brilliantly now!
Summary
Unable to use VSCode Apex Debugger (official Salesforce plugin). Suspect the issue is due to recent migration from SFDX to SF
Warning: Deprecated environment variable: SFDX_DEFAULTUSERNAME. Please use SF_TARGET_ORG instead.
Steps To Reproduce
Expected result
Debugger runs
Actual result
Debugger errors with VSCode/Windows error...
An unexpected error occurred while launching the debugger session. Refer to the Debug Console for details.
Debug Console message...
System Information
GitBash for windows.
Additional information
I have also run these commands here to try and set the SFDX_DEFAULTUSERNAME and SFDX_INSTANCE_URL environment variables and it doesn't make a difference.
https://developer.salesforce.com/docs/atlas.en-us.sfdx_setup.meta/sfdx_setup/sfdx_dev_cli_config_values.htm