How to debug composer post update commands - debugging

I have a composer packege which i want to modify, it is part of Laravel framework, but i want to modify it big time. For that i need the xdebug to be able to run via the composer.
To be precise it runs on composer post update hook and there is a error in it.. i can not get it to work, but cant debug it. Anyone has any idea how i can do it?
I tried to do it via command line to test it, but i don`t get any meaningful answers. And i dont know how to run composer command in browser where i have a xdebug command active.

You can very easily get Xdebug remote debugging on the command line as well. No need for a browser. You simply do:
export XDEBUG_CONFIG="idekey=sangoku"
and then run the composer script. As long as you have xdebug.remote_enable set to 1 in php.ini, this will initiate a debugging request to an open IDE. Depending on your IDE, you might need to do something special though to allow this connection to come in.

Related

Why Laravel doesn't accept changes until I stop swoole

Every time I make some change in Laravel, I need to do php artisan swoole:http stop and after that php artisan swoole:http start. It doesnt see my changes until I do that. Is there any other way to reloading server, or what..Also, when I do docker-compose up -d it starts running, but in app I am getting Connection is refused.. I am new with Docker and Swoole. Can someone explain to me how to use it? Thank you
I assume you're using octane but in general.
it loads the application into memory and then serves the application from memory. if you're doing local development there is a watcher you can add that will auto-reload when it detects changes.
https://laravel.com/docs/9.x/octane#watching-for-file-changes
As more of a general statement and background: this is how most programming languages work, the code is compiled into an executable and any time you need to make changes, you would have to recompile and re-execute the program.
PHP is an interpreted language so the compilation normally happens as you execute the script which means it can respond to filesystem changes without you having to manually restart or recompile. This may be convenient but it also can be very poor performing.
Various optimizations can be made to change how/when the code is compiled to improve performance (opcache, swoole, etc). When you're running with these optimizations, you will have to follow their guidelines on what needs to be done when you make changes (recompile, restart, or clear caches).

Cannot connect front-end template to node-template in Substrate

So, I installed everything as directed in the documentation, both the node-template and front-end template. Then, I went on to run ./target/release/node-template --dev --tmp in the node-template directory, which worked fine and was able to produce blocks. After opening a new terminal and moving to the front-end template, I used the command yarn start. This didn't produce any error and I was redirected to https://localhost:8000/front-end-template. The site took too much time to load and I was not able to see the Polkadot UI. Looks like the front end could not be integrated with the node-template.
Any help would be much appreciated.
In the front-end template directory while the node-template is running,
run yarn install and after everything works well then yarn start
OR, remove the front-end template and clone a new one if you didn't make significant changes to old one.
OR, stop the node-template and run this command ./target/release/node-template purge-chain then start the front-end.
I used do these and get this problem fixed, quickly!

Fail to create a directory for Laravel project in Visual Studio Code

I have been stuck here for a long time, may I know where did the process goes wrong and how can I make it work?
This is the written command and the result
Please check below things to confirm.
Is PHP installed..please check with php -v.
If installed, is it available in the system environment variable.

Browser not showing the change after updating User.vue file

My question is when I change anything in the Example.vue, User.vue or any of my Vue components and refresh my browser it doesn't get the updates at all, the old values still remain. Even if I delete the entire code in any of my components it's still there. I clear my browser cache, restart the computer, run dev, npm run watch, ran dump-autoload, Php artisan clear cache. I am using laravel 5.8. I am running or of ideas. Any ideas.
Thanks
Do you have supervisor running on your pc? If you do, run
supervisorctl restart all
read more here
and here

Any way to use nodemon + debugger with Cloud9 IDE?

The javascript debugger in Cloud9 is great, but it only appears to work if I run 'node' rather than using something like 'nodemon'.
I'd like the run command to restart if a file changes, and I also want to use the debugger. Anyone know a quick fix for this?
Discovered that there's no need to restart the runner - changes are applied to the run environment / configuration immediately. Even better!
That's what I wanted to write, it applies changes automatically.
Though, if you make changes to routes, you have to restart the server,
at least that's what I was having to do.

Resources