laravel-debugbar icon indicating copy to clipboard operation
laravel-debugbar copied to clipboard

Question - How to enable linking to views with docker container and vscode editor?

Open carbtest opened this issue 9 months ago • 5 comments

.env file

DEBUGBAR_LOCAL_SITES_PATH='~/home/username/sites/project'
DEBUGBAR_OPEN_STORAGE=true
DEBUGBAR_EDITOR='vscode'

when i click on link for a view in the debugbar nothing loads in vscode

Note the url for the link is vscode://file/~%2Fhome%2Fusername%2Fsites%2Fproject%2Fresources%2Fviews%2Factions%2Fedit.blade.php:1

Not sure if i missed something

carbtest avatar Feb 12 '25 18:02 carbtest

That is not an issue, and you should read the vscode documentation, or ask for support there, all IDEs handle it differently

parallels999 avatar Feb 12 '25 18:02 parallels999

am i approaching adding the path correctly?

carbtest avatar Feb 12 '25 18:02 carbtest

If it is an absolute path, yes

parallels999 avatar Feb 12 '25 19:02 parallels999

During a wifi outage vscode informed me that it could not save the file with the full URL. so I was able to detect the full link to add to .env and thus get opening files from that link to work at last. the syntax (in my case) is : vscode-remote://dev-container+7b226...7d7d@ssh-remote+i9/var/www/html/resources/views/front/microsites/list.blade.php (where 7b... is the container_id and "i9" is my ssh remote server )

My problem now is to know where that ID comes from (7b...) to be able to do it without having to cut the network... Important: the id does not change when closing the session so I estimate that it is in my local vscode ...

horaciod avatar Mar 07 '25 02:03 horaciod

During a wifi outage vscode informed me that it could not save the file with the full URL. so I was able to detect the full link to add to .env and thus get opening files from that link to work at last. the syntax (in my case) is : vscode-remote://dev-container+7b226...7d7d@ssh-remote+i9/var/www/html/resources/views/front/microsites/list.blade.php (where 7b... is the container_id and "i9" is my ssh remote server )

My problem now is to know where that ID comes from (7b...) to be able to do it without having to cut the network... Important: the id does not change when closing the session so I estimate that it is in my local vscode ...

the only way I found to get the id --- was searching in the log of the "terminal" in vscode

Image

horaciod avatar Mar 07 '25 03:03 horaciod