forcedotcom / salesforcedx-vscode

Salesforce Extensions for VS Code
https://developer.salesforce.com/tools/vscode
BSD 3-Clause "New" or "Revised" License
953 stars 406 forks source link

Command 'SFDX: Launch Apex Replay Debugger with Current File' resulted in an error #5528

Closed chiragpaliwal closed 5 months ago

chiragpaliwal commented 6 months ago

Summary

Issue launching an Apex Replay Debugger session with a downloaded apex log.

Steps To Reproduce:

  1. VSCode Command Palette - SFDX: Get Apex Debug Logs
  2. VSCode Command Palette - SFDX: Launch Apex Replay Debugger with Current File

Expected result

It should initiate an Apex Replay Debugger session with a yellow highlighted line at the start of the debug log.

Actual result

image

Additional information

  1. The debug log in the org has been generated for my user.
  2. The trace flag information: 60.0 APEX_CODE,FINEST;APEX_PROFILING,NONE;CALLOUT,NONE;DB,INFO;NBA,NONE;SYSTEM,NONE;VALIDATION,NONE;VISUALFORCE,FINER;WAVE,NONE;WORKFLOW,NONE
  3. I have already tried setting up a new SFDX project, Re-authorizing sandbox

Salesforce Extension Version in VS Code: Salesforce Extension Pack (Expanded) v60.5.1

SFDX CLI Version: @salesforce/cli/2.35.6 darwin-arm64 node-v20.11.1

Java Version: openjdk 17.0.6 2023-01-17 LTS OpenJDK Runtime Environment Zulu17.40+19-CA (build 17.0.6+10-LTS) OpenJDK 64-Bit Server VM Zulu17.40+19-CA (build 17.0.6+10-LTS, mixed mode, sharing)

OS and version: macOS Sonomo 14.3.1 (23D60)

VS Code version:


Commit: 5c3e652f63e798a5ac2f31ffd0d863669328dc4c
Date: 2024-04-03T13:28:09.495Z
Electron: 28.2.8
ElectronBuildId: 27744544
Chromium: 120.0.6099.291
Node.js: 18.18.2
V8: 12.0.267.19-electron.0
OS: Darwin arm64 23.3.0```
mingxuanzhangsfdx commented 6 months ago

Hi @chiragpaliwal , the sfdx command in the screenshot has been deprecated. could you try to update to the latest version of extensions v60.7.0, reload VS Code, open up the log file and run SFDX: Launch Apex Replay Debugger with Current File again and see the result?

If that does not work, could you try to open up an Apex Test file, click Debug Test from Code Lens to run the apex test and then see if it works and the log file is generated?

chiragpaliwal commented 6 months ago

@mingxuanzhangsfdx I have updated the replay debugger to v60.7.0 still the same error.

For the Apex Test file Run Test executes just fine but Debug Test doesn't do anything.

daphne-sfdc commented 6 months ago

Hi @chiragpaliwal, Can I get the following info?

  1. Run Developer: Show Running Extensions from the command palette and send me a screenshot of that page. I would like to confirm that you have all the extensions activated and all of them are on v60.7.0.
  2. Any error messages in the Problems tab of the bottom panel?
  3. What is in the Output tab of the bottom panel? Try selecting Apex and Apex Replay Debugger in the dropdown - do either of those two show any error messages?
  4. Run Developer: Toggle Developer Tools from the command palette. What error messages are present there?
chiragpaliwal commented 5 months ago

@daphne-sfdc , Thanks for responding! I guess this had something to do with me using the Salesforce Extension Pack (Expanded), the issue was resolved after I installed the Salesforce Extension Pack.