Skip to content

Please create wiki or add to ReadME: Info about IDE Key and Trigger Values #42

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

Closed
TonyGravagno opened this issue Aug 19, 2022 · 3 comments

Comments

@TonyGravagno
Copy link

The configuration says:

Select your IDE to use the default sessionkey or choose other to use a custom key.

Then we have:

If your xdebug is configured with a unique trace trigger key, set that value here
If your xdebug is configured with a unique profile trigger key, set that value here.

I can't find any information for this extension about what configuration is required in the IDE that corresponds to these values. There's nothing here about what values to use or why.

Here are some answers

Trigger values

The Trace Trigger Value or Profile Trigger Value are sent from the browser to the server when tracing or profiling are enabled. In php.ini, tell xdebug to start when the request includes a trigger, and also what trigger should be used. Examples:

Set the Trace Trigger Value for the extension to "Debugging" and the Profile Trigger Value to "Profiling".
Then set php.ini values as follows:

xdebug.start_with_request=trigger
xdebug.trigger_value=Debugging,Profiling

The actual values can be anything simple (avoid spaces and alphanumerics), as long as the client and server settings agree on the values.

Xdebug help for start_with_request=trigger.
Xdebug help for trigger_value.

Prior to Xdebug 3.1, trigger_value only supports one value.

IDE Key

[TL;DR] Let's preface with a quote from Derick Rethans (author of Xdebug) : "the IDE key is irrelevant".

Here is an example of logging that shows the idekey. The documentation for that logging, specifically Connection Initialization which includes the XML init tag, describes this as the DBGP_IDEKEY environment variable, and says "This value may be empty."

IDE Key with VSCode example:

The IDE Key is pre-defined in this extension for some popular IDEs, but not for other popular IDEs. In particular, Visual Studio Code is not yet in the list. For this and other undefined IDEs, use the "other" option in extension config.

The commonly accepted value for VSCode is VSCODE, all caps. See this discussion in the Chrome extension on which this Firefox extension is based. Other values can be used, though a developer should have a good reason and research the topic.

To get VSCode to agree with the IDE Key in this extension, the VSCode environment can be configured with specific idekey values source. See configuration documentation for other IDEs that support Xdebug for equivalent configuration details.

launch.json :

"configurations": [
   {
      "name": "Debug Configname",
...
      "env": {
	      "XDEBUG_CONFIG": "idekey=VSCODE",
	      "DBGP_IDEKEY": "VSCODE"
      },
   }

The text here isn't being suggested as verbatim content for the Readme or wiki, but as material that can be included to help people to understand and use this extension.

I haven't even fully verified all of the detail. Let's check it out, verify it, modify it here, and then publish the final verified information somewhere.

Thanks.

@mortona42
Copy link

With xdebug set to start with trigger, the debugger needs to get a XDEBUG_TRIGGER value.
I can set this in the url, but it would be nice to use this extension to set it as a cookie.

@TonyGravagno
Copy link
Author

As I understand it, the trigger value is currently sent in the header. If you want it in a cookie, I believe that would be an enhancement request, and should be in a different issue. I created this ticket to request documentation for how the extension currently works. If/when that's in place and new features are added related to this area, we'll need to ensure the doc is updated with the current functionality.

In summary : I suggest you create a new ticket. If this extension is already supposed to put the value in a cookie and it doesn't that's a bug, otherwise this is an enhancement request. When there is info about that functionality, yeah, let's add it to this ticket.

@BrianGilbert
Copy link
Owner

the settings popup has info about this, 1.0.10 (pending review by mozilla) has a link to settings from the address bar popup.

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

3 participants