Switching from netbeans to phpstorm, debug, deployment, ...
Hi, i try to switch from netbeans to phpstorm. But i encounter huge problems.
phpstorm version: 98.521
Remote Server: my-project.linux.local (apache2+xdebug)
My Project is not an remote Project, i use git, so i cloned my project to local path (e:\projects\my-project) and enabled deployment to the webserver -> http://my-project.linux.local (/var/www/my-project/web/my-project.linux.local).
It's an TYPO3 project, so i included the typo3 sources as exteral library (e:\php-libs\typo3-4.4.4).
1. Problem: Remote Debugging
With netbeans no problem (mapping: e:\php-libs\typo3-4.4.4 -> /var/www/my-project/typo3-4.4.4).
In phpStorm i added the mapping in the debug configuration under "Defaults/PHP on Server"
There i added the Server, and added a mapping like in netbeans (Local Path on Client: e:\php-libs\typo3-4.4.4 // Local Path on Server: /var/www/my-project/typo3-4.4.4)
But it stops always with the message, that the Local path e:\php-libs\typo3-4.4.4\typo3\.... ist not mapped
When i try to debug the index, it stops when a file from the library is required with the message:
Cannot find a local path for the path on server /var/www/my-project/typo3-4.4.4/...
What am i doing wrong? Without debugging i will never be able to switch to phpstorm.
2. Problem
netbeans deploys every file that has been changed, also the files which has been changed by external editors.
It seems, that phpstrom only deploys the files which are changed by itself. Is there a config for that somewhere?
This is very important for me, cause i write typoscript in an external editor with highlighting.
3. Minor issue:
In every editor/IDE i use, STRG+W closes the active file (this is the standard shortcut since ages). I am not able to config this behavior in phpstorm. I added STRG+W to "Close Active Tab", but it won't work. It simply does nothing.
4. I miss "save as..." very much. Where do i have to search for (and why is it hidden so much)?
5. Under version controll (git) the folders with changed files are not visible marked. In netbeans there is a blue symbol at each directory (recursiv) where changes are made. This is very useful. Is there something similar in phpStorm?
Greetings
PPP
Please sign in to leave a comment.
Hi there,
In last EAP build (PS-98.521) the debugging interface/logic was changed quite a bit and it is not obvious for quite a lot of people of how to set it up. This is work in progress and new builds should have this situation improved (hopefully we will get fresh build tonight).
1) Set up your mappings here: Settings | PHP | Browser Toolbar Debug Mappings. There quite a few posts here on forum and issue tracker regarding this problem -- for example http://youtrack.jetbrains.net/issue/WI-4339 -- you can look at screenshot to have an idea how it can be setup. You may also need to map your external libraries (not part of the Project itself (visible in Settings | Directories) but rather included via Settings | PHP) -- the same logic as above.
2) Sorry, cannot help here as I'm not using PhpStorm for any Deployment (except basic "upload this file quickly now") -- all development is local.
3) Which keymap do you use? Settings | Keymap -- click on "Filter" icon next to search box and press Ctrl+W in that pop up window -- and it will show you which actions do have this shortcut assigned to (most likely it will be Main Menu | Edit | Select Word at Caret). Obviously you need to unassign it first.
It happens to me one that upon reassigning shortcut it stopped working completely -- restart PhpStorm solved that issue for me.
4) Whole IDEA platform is built on different philosophy. There is no "Save As" functionality. Just use Refactor | Copy (F5) on file (click anywhere in file, preferably in empty space, and press F5 (or whatever other shortuct you may have assigned to it)).
Here is feature request: http://youtrack.jetbrains.net/issue/WI-842?projectKey=WI
5) Same as #2 -- I do not use any VCS at the moment and cannot give any advice on this (but I plan to start using it).
Thanks a lot for the debug tip! Now it works fine. I'd never searched at this setting position. :-)
I use a copy of the default keymap and already deleted any other assignment. But it doesn't helps.
To which action you have assigned it to? As I understand it was "Close Active Tab".
Well, apperently it is wrong action -- the proper is Main Menu | Window | Close (default shortcut is Ctrl+F4 - just search by shortcut).
And again thank you! That works quite well.
Andriy, thank you for your help!
Ok debugging works now very well - that was the most important issue. :)
Strg+W works too and i will be able to live without "save as".
Over all i am pretty happy with phpstorm and i bought a lizenz. :)
Now there are just 2 points open:
1. Is the VCS directory marking a missing feature or is it possible?
2. And the same question for the deployment of all files ...
Please tell me if it is possible or if i should open a feature request.
With best regards
PPP
Not sure that you mean under "VCS directory marking".. Please elaborate.
Deployment plugin that supports FTP/SFTP/Mounted folders is bundled since 1.0
Hi and thanks for your reply.
1. ATM (with my standard settings) only changed files are visible marked with a dark blue color. But in normal projects i have several changed files in many subfolders. In netbeans the folders are recursive visible marked with a blue symbol. So you see very quick any folder where changes are done. See the added screen shot - do you see the blue symbols?
2. And this plugin is realy not bad. I like the sync methods.
But my problem is, that only files are deployed which has been changed by phpStorm. I am forced to use different editors for different file types (eg. TYPOscript) and any file which is changed by an external editor is not deployed automatically. Netbeands deploys any changed file in the project at once (also images and other resources). This is very useful and i need it very much.
3. Since today i have an other problem. I try to add an external Javascript library - in this case jQuery. In my TYPO3 project several optional JS libraries are available (extBase, jQuery, mootools, prototype, ...). But i use jQuery for the frontend only. ATM its a somehow annoying, cause all libraries are displayed by code completion. The plan was to add the library and set it for the project JS folder, so that only this library will be used. But i am unable to add a JS library. I go to Settings > JavaScript > Libraries, then i push »Add« and attach the jQuery source file. So far so well, but when is press Ok, nothing happens. The libraries field stays empty.
What am i doing wrong?
Greetings
PPP
Attachment(s):
netbeans.jpg
Is there any possibility to add a javascript library? Am i the only one with this problem?
Hello,
Currently automatic upload of externally changed files is not supported, please comment and vote for http://youtrack.jetbrains.net/issue/WI-2171 (current issue is about uploading on VCS operations, but you can comment to add your usecase).
Regards,
Kirill
I couldn't find any problems with adding a library in PhpStorm EAP 98.521. Are you still using this EAP? Do you get any internal IDE errors?
I tested it now with 98.521 - and wow it works.
But with 100.36 it is not possible to add a javascript library.
I saved the project in 98.521 and opened it in 100.36. The library (jQuery) is present, but now code completion nearly doesn't works at all.
I uninstalled both installations (98.521, 100.36) and deleted the user folder. Than i installed phpStorm 100.36 again and tried it with a new clean project. Always occurs an error, when i try to add a JS library. I reported it to JetBrains. Hope it helps.
All reported exceptions are processed and if the trace is sufficent to pinpoint the problem - fixed right away.
However it might speed the things up a bit if you post the stack trace right into this thread - since we already bringed the topick here.
Here it comes:
Error during dispatching of java.awt.event.MouseEvent[MOUSE_RELEASED,(1158,102),absolute(1346,258),button=1,modifiers=Button1,clickCount=1] on dialog0
java.lang.NullPointerException
at java.util.Arrays$ArrayList.<init>(Arrays.java:3357)
at java.util.Arrays.asList(Arrays.java:3343)
at com.intellij.openapi.roots.libraries.scripting.ScriptingLibraryTable$LibraryModel.<init>(ScriptingLibraryTable.java:161)
at com.intellij.openapi.roots.libraries.scripting.ScriptingLibraryTable.createLibrary(ScriptingLibraryTable.java:131)
at com.intellij.openapi.roots.libraries.scripting.ScriptingLibraryManager.createLibrary(ScriptingLibraryManager.java:149)
at com.intellij.ide.scriptingContext.ui.ScriptingLibraryTableModel$1.run(ScriptingLibraryTableModel.java:82)
at com.intellij.openapi.application.impl.ApplicationImpl.runWriteAction(ApplicationImpl.java:834)
at com.intellij.ide.scriptingContext.ui.ScriptingLibraryTableModel.createLibrary(ScriptingLibraryTableModel.java:79)
at com.intellij.ide.scriptingContext.ui.ScriptingLibrariesPanel.addLibrary(ScriptingLibrariesPanel.java:99)
at com.intellij.ide.scriptingContext.ui.ScriptingLibrariesPanel.access$000(ScriptingLibrariesPanel.java:34)
at com.intellij.ide.scriptingContext.ui.ScriptingLibrariesPanel$1.actionPerformed(ScriptingLibrariesPanel.java:53)
at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:1995)
at javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2318)
at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:387)
at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:242)
at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(BasicButtonListener.java:236)
at java.awt.Component.processMouseEvent(Component.java:6267)
at javax.swing.JComponent.processMouseEvent(JComponent.java:3267)
at java.awt.Component.processEvent(Component.java:6032)
at java.awt.Container.processEvent(Container.java:2041)
at java.awt.Component.dispatchEventImpl(Component.java:4630)
at java.awt.Container.dispatchEventImpl(Container.java:2099)
at java.awt.Component.dispatchEvent(Component.java:4460)
at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4577)
at java.awt.LightweightDispatcher.processMouseEvent(Container.java:4238)
at java.awt.LightweightDispatcher.dispatchEvent(Container.java:4168)
at java.awt.Container.dispatchEventImpl(Container.java:2085)
at java.awt.Window.dispatchEventImpl(Window.java:2478)
at java.awt.Component.dispatchEvent(Component.java:4460)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:599)
at com.intellij.ide.IdeEventQueue.defaultDispatchEvent(IdeEventQueue.java:652)
at com.intellij.ide.IdeEventQueue._dispatchEvent(IdeEventQueue.java:502)
at com.intellij.ide.IdeEventQueue._dispatchEvent(IdeEventQueue.java:405)
at com.intellij.ide.IdeEventQueue.dispatchEvent(IdeEventQueue.java:369)
at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:269)
at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:184)
at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:178)
at java.awt.Dialog$1.run(Dialog.java:1046)
at java.awt.Dialog$3.run(Dialog.java:1098)
at java.security.AccessController.$$YJP$$doPrivileged(Native Method)
at java.security.AccessController.doPrivileged(AccessController.java)
at java.awt.Dialog.show(Dialog.java:1096)
at com.intellij.openapi.ui.impl.DialogWrapperPeerImpl$MyDialog.show(DialogWrapperPeerImpl.java:670)
at com.intellij.openapi.ui.impl.DialogWrapperPeerImpl.show(DialogWrapperPeerImpl.java:412)
at com.intellij.openapi.ui.DialogWrapper.showAndGetOk(DialogWrapper.java:1063)
at com.intellij.openapi.ui.DialogWrapper.show(DialogWrapper.java:1048)
at com.intellij.ide.actions.ShowSettingsUtilImpl._showSettingsDialog(ShowSettingsUtilImpl.java:59)
at com.intellij.ide.actions.ShowSettingsUtilImpl.showSettingsDialog(ShowSettingsUtilImpl.java:45)
at com.intellij.ide.actions.ShowSettingsAction.actionPerformed(ShowSettingsAction.java:53)
at com.intellij.openapi.actionSystem.impl.ActionButton.actionPerfomed(ActionButton.java:153)
at com.intellij.openapi.actionSystem.impl.ActionButton.performAction(ActionButton.java:129)
at com.intellij.openapi.actionSystem.impl.ActionButton.processMouseEvent(ActionButton.java:289)
at java.awt.Component.processEvent(Component.java:6032)
at java.awt.Container.processEvent(Container.java:2041)
at java.awt.Component.dispatchEventImpl(Component.java:4630)
at java.awt.Container.dispatchEventImpl(Container.java:2099)
at java.awt.Component.dispatchEvent(Component.java:4460)
at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4577)
at java.awt.LightweightDispatcher.processMouseEvent(Container.java:4238)
at java.awt.LightweightDispatcher.dispatchEvent(Container.java:4168)
at java.awt.Container.dispatchEventImpl(Container.java:2085)
at java.awt.Window.dispatchEventImpl(Window.java:2478)
at java.awt.Component.dispatchEvent(Component.java:4460)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:599)
at com.intellij.ide.IdeEventQueue.defaultDispatchEvent(IdeEventQueue.java:652)
at com.intellij.ide.IdeEventQueue._dispatchEvent(IdeEventQueue.java:502)
at com.intellij.ide.IdeEventQueue._dispatchEvent(IdeEventQueue.java:405)
at com.intellij.ide.IdeEventQueue.dispatchEvent(IdeEventQueue.java:369)
at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:269)
at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:184)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:174)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:169)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:161)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:122)
It's a known problem in EAP 100.36. It has been fixed already and JavaScript libraries should work correctly in the next EAP. Thanks for spotting it anyway!
Hi, I'm refreshing the thread as no one provided an answer for the VCS question, and I still can not find this functionallity in newest version (4.0 RC2).
I have the same problem as author of the thread - the modified files that are under control of a VCS are marked by default with a blue color (this is configurable in Settings > Editor > Colors & Fonts > File Status > Modified). But every IDE I've used before also marks the directory in which the modified file resides. So if i have a file structure like this:
foo/
file.php
bar/
baz.php
that means the baz.php file is modified. What I expect from the IDE is to mark the directory 'bar' as modified as well, since it contains a modified file. Like this:
foo/
file.php
bar/
baz.php
Same thing if a file is added, removed or modified in some other way, and it is not commited yet:
foo/
old-file.php
bar/
new-file.php
I've search the manual, tried to find it in 'Settings' by myself, googled for it but without any luck. Is this becouse PhpStorm lacks that kind of functionality and should I post a feature request (also couldn't find a ticket for it in YouTrack)? The 'Changes' tab (Alt + 9) is very helpful, but still I can't live without being able to see the changes in direcotry structure. This leads to situations, in which I forget to commit some files (and my boss is angry with me ;) ).
Hi there,
This functionality is not available in current versions of IDEA-based products (IntelliJ, PhpStorm etc)
Please vote/comment/watch/etc http://youtrack.jetbrains.com/issue/IDEA-63872 , http://youtrack.jetbrains.net/issue/IDEA-64922
Oh ok, that's too bad. I'll be looking forward for this feature.
But anyway thank you very much for the fast response [beer] :)
One feature that I miss from working with Netbeans is a tab on the left panel, with all the methods defined in a class
@Maxxyro
Structure panel
https://www.jetbrains.com/help/phpstorm/structure-tool-window-file-structure-popup.html