Closed mac-s-g closed 1 year ago
When I run that command in the terminal it takes a while. How long does it take for you to manually run the command artisan route:list --json
?
thanks for the quick reply.
takes about a second running in the terminal. a little bit longer to see json in the output panel when i invoke the command with the extension.
the video is a little misleading. i've left those display panels open for extended periods of time (10 mins or so) and the display doesn't update.
This behavior is really annoying, especially when checking routes, as it keeps repeating to update the real-time listing.
I investigated, and the problem is in the Common.js at: https://github.com/TheColorRed/vscode-laravel-artisan/blob/42c6c2ec9fdec6e994d586b16b335949a5f199ac/src/Common.ts#L129
This line of code forces the display of the output panel/channel for any message, and I believe the correct behavior should be to only open the panel for error messages (as it happens a few lines below) or something relevant to the command we are executing.
I made a pull request removing this line of code. But in my opinion, this option could be configurable if displaying logs is really important for the extension.
I just realized that this issue has nothing to do with the pull request I made, which only fixes the unnecessary display and focus gain of the output panel. Please disregard my previous message.
Here is a temporary workaround:
Modify the route/List
file to the following:
this.subscription = this.observable.subscribe();
setTimeout(() => this.subscription.unsubscribe(), 2000); // add this line
Change the default observer time from 5000ms to 1000ms.This gives enough time to load the routes and will run php artisan route:list
only once or twice before the subscription is cancelled by the timeout handler.
Also, if you don't like the Laravel Artisan
panel from popping up, comment the outputConsole.show()
in utils/Output
.
Effectly, this workaround requires you to manually change the extension. This is not the proper way to fix the undesirable behavior, but it does work.
Marking issue as stale since there has'nt been any activity recently.
hey, thanks for all the work you've shared with the vscode+laravel community.
I recently installed the extension within a vscode devcontainer.
when invoking commands through the extension, the display panel only shows "Loading Route Information...".
the terminal output looks good (for example, "Artisan: Migrate Status" successfully runs
migrate:status
and displays migrations in my terminal), and the extension doesn't output any errors.here's a video showing the issue in a little more detail: https://github.com/TheColorRed/vscode-laravel-artisan/assets/4097374/ede73f71-c07b-4025-b76c-1b689fa059f0
do you have any ideas on how to debug?
thanks for your help!