Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot launch apex debugger #2160

Closed
Siraris opened this issue May 1, 2020 · 14 comments
Closed

Cannot launch apex debugger #2160

Siraris opened this issue May 1, 2020 · 14 comments
Assignees

Comments

@Siraris
Copy link

Siraris commented May 1, 2020

Summary

I am having a similar issue to #722 which seems to have been resolved in 2018... when I try to launch the apex debugger in VS code 1.44.2, it just pops this:

image

and never actually executes.

Steps To Reproduce:

  1. Write an APEX class
  2. Try to click the play button on Launch Apex Debugger

Expected result

The debugger would run

Actual result

I get a blank popup that seems to indicate an error, with a button to open the launch config.

@lcampos
Copy link
Contributor

lcampos commented May 5, 2020

Thanks for opening this issue @Siraris . I've been able to replicate this screen by trying to run Apex Interactive Debugger with a user that does not have the Debug Apex permission. Does adding that permission to your user get you past the blank error ?

We'll look into releasing a fix so the error screen actually has a message on it.

@mattaGIT
Copy link

mattaGIT commented May 8, 2020

I have this exact same issue. It doesn't matter if the permission set is added to the user or if it is not.

@streco
Copy link

streco commented May 9, 2020

I have also it this same issue, regardless of if the permission set is added or not. In my case, I had been using the debugger for a while, and then it just stopped working.

Killing the Debugger session in the org via "Custom Code" -> "Apex Debugger" -> "Kill Debugger" resolved this issue for me, but it seems there is still a bug where error messages are not being displayed.

@no-response
Copy link

no-response bot commented May 13, 2020

This issue has been automatically closed because there has been no response to our request for more information from the original author. Currently, there is not enough information provided for us to take action. Please reply and reopen this issue if you need additional assistance.

@no-response no-response bot closed this as completed May 13, 2020
@lcampos lcampos reopened this May 13, 2020
@lcampos lcampos self-assigned this May 13, 2020
@Siraris
Copy link
Author

Siraris commented May 14, 2020

@lcampos Sorry I honestly didn't see your initial response (strange). I am checking with our admin and I'll get back tomorrow with an answer. Not too familiar with how SF permissions work.

@Siraris
Copy link
Author

Siraris commented May 14, 2020

@lcampos Our sys admin says he doesn't know of a permission called Debug Apex. He says I'm a sysadmin on our sandbox. Do you know exactly what he needs to do?

@Siraris
Copy link
Author

Siraris commented May 15, 2020

@lcampos Question, can I ONLY debug using VScode in scratch orgs? Or can I debug in the sandbox too?

@jerhewet
Copy link

jerhewet commented May 22, 2020

Same issue for me as well. Is there a "known good" version of all these tools (read as: specific versions of Visual Studio Code and versions of everything deployed as part of the Salesforce Extension Pack) that I can install so I can start getting some work done? Failing that, are there specific, documented (and up-to-date documentation) guides that will help me get all of this stuff working?

Right now I have to do all my prototyping in my web browser because there are so many issues with the latest versions of SFDX that all seem to be related to configuration. If you want me to supply specifics just let me know what (and HOW!) to turn on tracing and logging options for SFDX and I'll supply whatever logfiles are generated.

And STOP CLOSING BUGS when it's pretty obvious there are so many developers that have the same reported issue.

@permrevolution
Copy link

permrevolution commented May 23, 2020

Note as of writing this message, I updated all salesforce extensions in vsCode as well as SFDX CLI.

  1. I also cannot find the step 9 setting in my scratch org by searching or in the System Permissions: 9. Enable Debug Apex. The other permissions that Debug Apex requires are added automatically.

https://developer.salesforce.com/tools/vscode/en/apex/interactive-debugger/
image

  1. I figure it's already enabled, but what can I do?

  2. I get the same error as above.

In the debug console I see:
Connected to Streaming API channel /systemTopic/ApexDebuggerSystemEvent.
Connected to Streaming API channel /systemTopic/ApexDebuggerEvent.

Then it fails with this blank error.

image

@mingjiefeng
Copy link

I got the exact same error and symptom as permrevolution's

@lcampos
Copy link
Contributor

lcampos commented May 26, 2020

hi, there are several questions so I'll try to address all of them below.

I have this exact same issue. It doesn't matter if the permission set is added to the user or if it is not.

This could be caused by the org having reached the limit of concurrent streaming api connections. You can run SFDX: Stop Apex Debugger Session and retry running the debugger.

Our sys admin says he doesn't know of a permission called Debug Apex

This is a permission that gets enabled after purchasing a license. If your org does not have it you would have to talk to your Account Executive. In the meantime you can use the Apex Replay Debugger which does not require additional licenses.

can I ONLY debug using VScode in scratch orgs? Or can I debug in the sandbox too?

The Apex Interactive debugger can be used only in scratch orgs and sandboxes. The Apex Replay Debugger can be used in any org that generates Apex Debug logs.

are there specific, documented (and up-to-date documentation) guides that will help me get all of this stuff working?

You can go to our doc site https://developer.salesforce.com/tools/vscode/ or go through the following trailheads https://trailhead.salesforce.com/content/learn/projects/quickstart-vscode-salesforce, https://trailhead.salesforce.com/en/content/learn/projects/quick-start-lightning-web-components/set-up-visual-studio-code. I'm sure there's more content but this should be a good start.

Is there a "known good" version of all these tools ?

Yes, the latest version in the Microsoft marketplace. As with any open source software, if you run into bugs or feature gaps we ask you to open a github issue and we'll work with you to get it addressed.

STOP CLOSING BUGS when it's pretty obvious there are so many developers that have the same reported issue.

We have automation that helps us with the management of the repo. There are situations in which we don't get enough details in an issue for us to work on it and if the author does not reply with additional details it will get closed. As you can see, if the author does reply or the issue is active we do re-open it if it was closed by the automation.

@lcampos
Copy link
Contributor

lcampos commented May 26, 2020

Specific to the issue, we have a fix that is currently under review and if everything goes well it will be released later this week. I've attached a zip file with the vsix file that contains the fix if you want to try out while we roll out the fix.
Again, thanks for providing feedback and sorry for the inconvenience this might've caused to your workflow.

salesforcedx-vscode-apex-debugger-48.17.0.vsix.zip

@Siraris
Copy link
Author

Siraris commented May 27, 2020

@lcampos Thanks for the response to this, and sorry some people are giving you a hard time.

@lcampos
Copy link
Contributor

lcampos commented May 29, 2020

Closing this since the fix was released as part of version 48.18.0. Thanks for providing feedback and sorry for the inconvenience this bug might've caused.

@lcampos lcampos closed this as completed May 29, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants