PHP Storm use always chrome on debug - cannot change it

Answered

Hey, i tried to use firefox for debugging - but phpstorm always open chrome -.-

i changed the default browser to firefox, change every browser selection to firefox ( and disable all other browsers ) but it continue open chrome on start debug ( even after deinstall chrome it tries to open it )

0
7 comments

Hi there,

1) What are you trying to debug -- JavaScript or PHP code?

2) If JavaScript -- what kind of Run/Debug Configuration do you use?

Screenshots please.

0

php code - i click on 'Run' -> 'Debug...' -> select the index file and the ide opens chrome

Browser config

0

Which one -- the one highlighted on that popup menu (1. index.php) ?

If so -- it's a Run/Debug Configuration of "JavaScript Debug" type. And here the behaviour is correct -- it works in Chrome only (for debugging JavaScript in Firefox you have to use separate "Firefox Remote" type of Configuration)

 

BTW -- via such context menu you will be able to create either "PHP Script" (runs in CLI mode) or "JavaScript Debug" types.

If you need to debug PHP code via browser (e.g. "PHP Web Application" etc) -- better create such Run/Debug Configuration manually ("Run | Edit Configurations..." .. or via drop-down box next to Run/Debug buttons on toolbar)

Have a look at these manuals in case if you have not seen them yet -- https://confluence.jetbrains.com/display/PhpStorm/Debugging+with+PhpStorm

0

ok - didnt know that Debug only starts a javascript debug session

so how can i start a php debug session as there is just one "Debug" point. i know i can open the website in browser manuelly and phpstrom will listen for remote debug connection but thats not what i want ( as i still have to use the browser plugin and navigate to the correct file ).

 

is it possible to change the "Debug" button behaviour to start a php debug session ( well like in many other php ide )

0

>ok - didnt know that Debug only starts a javascript debug session

That's not true:

1) It's just that this popup lists the "most appropriate options" .. and JavaScript Debug is one of them (not really sure why)

2) It also lists "PHP Script" .. so it's not "only javascript" already

3) If invoked in PHPUnit tests you may see other options

>so how can i start a php debug session as there is just one "Debug" point.

As I have already mentioned: create such Run/Debug Configuration manually ("Run | Edit Configurations..." .. or via drop-down box next to Run/Debug buttons on toolbar). You most likely will need "PHP Web Application" type.

Once created -- just select it in that drop-down box and click on "Debug" button. It may also appear in that popup dialog as well (sorry, not using such popup menu myself -- I prefer starting it from the browser)

https://confluence.jetbrains.com/display/PhpStorm/Debugging+PHP+Web+Applications+with+Run+Debug+Configurations

1

>is it possible to change the "Debug" button behaviour to start a php debug session ( well like in many other php ide )

By default for a random file? AFAIK no.

From what I remember it has always been like that.

0

oh nice - it works

 

was confused by the unnamed configuration and the automaticly javascript config creation ( after selecting a php file... )

 

Thanks for fast and perfect help ;)

 

0

Please sign in to leave a comment.