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

php debugging #148593

Closed
page3131 opened this issue May 2, 2022 · 23 comments
Closed

php debugging #148593

page3131 opened this issue May 2, 2022 · 23 comments
Assignees
Labels
*duplicate Issue identified as a duplicate of another issue(s) info-needed Issue requires more information from poster

Comments

@page3131
Copy link

page3131 commented May 2, 2022

Issue Type: Bug

I have several projects and several copies of several projects for different servers. I right click on the directory and it opens the folder as a project. At some point along the way the php debugger will not load the configuration. I have deleted the settings directory and saved the settings sometimes the dugger menu item comes back. I usually have 2 or more visual studio code projects loaded and navigating between them. As needed I turn off the debugger on one and turn it on with the another project. For some reason now I am unable to get the "run" in the menu and the left side debug icon doesn't show a start option or set up the settings option. It does seem to work in other projects. It seems to get locked on some projects. I think I saw a message about it already connected.

Step 1 load a project
Step 2 Activate php debugger
Step 3 open another project
Step 4 Deactivate debugger from step 1
Step 5 Attempt to use the debugger from step 3
Step 6 Repeat until the second project fails to show the debugging controls
Step 7 If the above fails load a bunch of projects and enable, use and disable the php debugger through out the list of open projects

Other than that I am not sure why it fails to load the debugger controls. For now in the worst case scenarios I have to switch over to Sublime.

VS Code version: Code 1.66.2 (dfd34e8, 2022-04-11T07:46:01.075Z)
OS version: Windows_NT x64 10.0.17763
Restricted Mode: No

System Info
Item Value
CPUs Intel(R) Xeon(R) Gold 6246R CPU @ 3.40GHz (4 x 3400)
GPU Status 2d_canvas: unavailable_software
canvas_oop_rasterization: disabled_off
direct_rendering_display_compositor: disabled_off_ok
gpu_compositing: disabled_software
multiple_raster_threads: enabled_on
oop_rasterization: disabled_off
opengl: disabled_off
rasterization: disabled_software
raw_draw: disabled_off_ok
skia_renderer: enabled_on
video_decode: disabled_software
video_encode: disabled_software
vulkan: disabled_off
webgl: unavailable_software
webgl2: unavailable_software
Load (avg) undefined
Memory (System) 20.00GB (4.04GB free)
Process Argv --crash-reporter-id c307ed96-e0fb-4d71-9ff2-7b4bdb7c0355
Screen Reader no
VM 100%
Extensions (16)
Extension Author (truncated) Version
SecurityIntelliSense azs 0.8.0
vscode-eslint dba 2.2.2
Ionide-fsharp Ion 6.0.2
csharp ms- 1.24.4
dotnet-interactive-vscode ms- 1.0.3175020
vscode-dotnet-pack ms- 1.0.8
vscode-edge-devtools ms- 1.4.8
python ms- 2022.4.1
vscode-pylance ms- 2022.4.3
jupyter ms- 2022.3.1000901801
jupyter-keymap ms- 1.0.0
jupyter-renderers ms- 1.0.6
vscode-typescript-next ms- 4.7.20220501
debugger-for-chrome msj 4.13.0
debugger-for-edge msj 1.0.15
php-debug xde 1.26.1
A/B Experiments
vsliv368:30146709
vsreu685:30147344
python383cf:30185419
vspor879:30202332
vspor708:30202333
vspor363:30204092
vswsl492cf:30256860
pythonvspyl392:30443607
pythontb:30283811
pythonptprofiler:30281270
vshan820:30294714
vstes263:30335439
pythondataviewer:30285071
vscod805:30301674
pythonvspyt200:30340761
binariesv615:30325510
bridge0708:30335490
bridge0723:30353136
vsaa593:30376534
vsc1dst:30438360
pythonvs932:30410667
wslgetstarted:30449410
pythonvsnew555:30457759
vscscmwlcmt:30465135
cppdebug:30475216
vscaat:30438848

@page3131
Copy link
Author

page3131 commented May 2, 2022

Otherwise an amazing product.

@page3131
Copy link
Author

page3131 commented May 2, 2022

I found that I can copy and paste the launch and settings json from another project and this will now show the debug control items.

@roblourens
Copy link
Member

Sorry, I don't follow. Can you show screenshots of what working and not working looks like? And what settings do you use to fix it?

@roblourens roblourens added the info-needed Issue requires more information from poster label May 3, 2022
@page3131
Copy link
Author

image

Not sure how I didn't notice that there was a comment on here. Can this case be opened again? In the screen shot you can see that the "run" is not in the menu. It is in the modules. Much of my previous copy and pasting files hasn't worked to get it back. I am now not able to debug this project. I am thinking I need to use sublime.

@page3131
Copy link
Author

image

@page3131
Copy link
Author

image

@page3131
Copy link
Author

Please bring back the debug run button.

@roblourens roblourens reopened this May 25, 2022
@roblourens
Copy link
Member

image

There is something weird going on here. You've selected the Edge devtools sidebar viewlet, but the "Run and debug" title is showing (and obviously has not loaded)

Any errors in the devtools (Help > Toggle developer tools)?

Can you click the debug icon in the activity bar (Play button with bug)?

@page3131
Copy link
Author

That is because my mouse is over the edge debug tool. This view is the run and debug tool bar.

Yes
image

@page3131
Copy link
Author

image

@page3131
Copy link
Author

This time I highlighted the debug button.

@page3131
Copy link
Author

So it is thinking it is already connected but it is not.

@page3131
Copy link
Author

Today I ended up taking the global settings.json and copying the content to the .vscode/settings.json. That brought the "run" button back when reloading vscode.

@page3131
Copy link
Author

Thanks for reopening the case.

@roblourens
Copy link
Member

Today I ended up taking the global settings.json and copying the content to the .vscode/settings.json. That brought the "run" button back when reloading vscode.

Good - Can you share your settings.json and explain exactly what you did?

@sbatten that stack above kind of makes it look like a DebugService was created twice in the course of creating the debug view - because the only path to register that extension handler twice is from the DebugService constructor. Any idea?

@sbatten
Copy link
Member

sbatten commented May 27, 2022

I can't explain it, but it looks like their are 2 copies of the run and debug view container, is that what you are suggesting as well?

@page3131
Copy link
Author

image
I noticed that the "run" menu was not in the top menu bar. I went to settings -> Extensions -> PHP Debug. I then hit the save button. I close out and reopen and now it shows. It usually is resolved by saving the settings. It seems to be inconsistent with exactly how it is saved. I have had this method not work. I then make a change an save. When that doesn't work I then copy new files. When that doesn't work I suppose I repeat the above and so far it has come back without much repetition.

@roblourens
Copy link
Member

roblourens commented May 31, 2022

I can't explain it, but it looks like their are 2 copies of the run and debug view container, is that what you are suggesting as well?

I guess so, but it seems like even if the view container is created twice, the DebugService shouldn't be created a second time too

Thanks @page3131, I don't totally follow but I don't really think that saving the settings.json is going to fix this issue, so it's probably a random occurrence

@page3131
Copy link
Author

page3131 commented Jun 2, 2022

What ever is going on is a work around to get the debugger started. Today I reloaded visual studio code 10 times. It would not load the debugger run button. I saved the settings. After reloading it was available. I don't know if it helps but I open the projects by directory.

@roblourens
Copy link
Member

I will merge this issue into #150169 because that seems to be the same issue and has some more details. As a workaround, does it help if you run the command "Reset View Locations"?

@roblourens roblourens added the *duplicate Issue identified as a duplicate of another issue(s) label Jun 7, 2022
@page3131
Copy link
Author

page3131 commented Jun 7, 2022

Reset View Locations doesn't help.

@roblourens
Copy link
Member

Ok, sorry - we will keep investigating in the other issue since the stack is the same

@github-actions github-actions bot locked and limited conversation to collaborators Jul 22, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
*duplicate Issue identified as a duplicate of another issue(s) info-needed Issue requires more information from poster
Projects
None yet
Development

No branches or pull requests

4 participants
@roblourens @sbatten @page3131 and others