I cannot debug with my localhost

help.jpg
Is this the right way to config?

0
24 comments
Avatar
Permanently deleted user

help.jpg

waitting forever.. anyone know how to solve this? thank in advance

0

Hi there,

1) First of all -- make sure that you do have xdebug installed and enabled -- http://confluence.jetbrains.com/display/PhpStorm/Xdebug+Installation+Guide

Check the output of phpinfo(); (check it via web browser and not in command line)

2) Delete all your entries at "Settings | PHP | Servers" -- the one you show on screenshot is NOT configured properly ("Host" field has to be host and not URL). When doing #3 IDE will help setting it up.

3) Follow this manual / article -- http://confluence.jetbrains.com/display/PhpStorm/Zero-configuration+Web+Application+Debugging+with+Xdebug+and+PhpStorm

Also: Webinar Recording: Debugging PHP with PhpStorm

0
Avatar
Permanently deleted user

Thanks for responsing. I tried those steps and I still cannot debug with localhost here is my screen shot.help1.jpghelp2.jpghelp3.jpg

Anything else I need to config? Thanks in advance

0

1) OK -- I see that xdebug is installed. But -- is it configured correctly?

Please show:
a) your xdebug settings from php.ini
b) whole xdebug section of the phpinfo() output

2) If you are trying zero-config approach (as I have suggested) --- why do you show me your Run/Debug configurations (which are simply not required for such approach)?

P.S.
BTW -- is this your SO question .. or that is somebody else? http://stackoverflow.com/questions/24310201/phpstorm-configure-xdebug

0
Avatar
Permanently deleted user

Hello!

I'm having similar issues than OP. Some serious debugging issues, I mean.

I have configured xdebug as instructed here, and here's relevant output in phpinfo:

xdebug

xdebug support enabled
Version 2.2.5
IDE Key PHPSTORM

Supported protocols Revision
DBGp - Common DeBuGger Protocol $Revision: 1.145 $

Directive Local Value Master Value
xdebug.auto_trace Off Off
xdebug.cli_color 0 0
xdebug.collect_assignments Off Off
xdebug.collect_includes On On
xdebug.collect_params 0 0
xdebug.collect_return Off Off
xdebug.collect_vars Off Off
xdebug.coverage_enable On On
xdebug.default_enable On On
xdebug.dump.COOKIE no value no value
xdebug.dump.ENV no value no value
xdebug.dump.FILES no value no value
xdebug.dump.GET no value no value
xdebug.dump.POST no value no value
xdebug.dump.REQUEST no value no value
xdebug.dump.SERVER no value no value
xdebug.dump.SESSION no value no value
xdebug.dump_globals On On
xdebug.dump_once On On
xdebug.dump_undefined Off Off
xdebug.extended_info On On
xdebug.file_link_format no value no value
xdebug.idekey PHPSTORM PHPSTORM
xdebug.max_nesting_level 100 100
xdebug.overload_var_dump On On
xdebug.profiler_aggregate Off Off
xdebug.profiler_append Off Off
xdebug.profiler_enable Off Off
xdebug.profiler_enable_trigger On On
xdebug.profiler_output_dir /var/tmp/ /var/tmp/
xdebug.profiler_output_name xdebug-profile-cachegrind.out-%H-%R xdebug-profile-cachegrind.out-%H-%R
xdebug.remote_autostart Off Off
xdebug.remote_connect_back Off Off
xdebug.remote_cookie_expire_time 3600 3600
xdebug.remote_enable On On
xdebug.remote_handler dbgp dbgp
xdebug.remote_host localhost localhost
xdebug.remote_log no value no value
xdebug.remote_mode req req
xdebug.remote_port 9000 9000
xdebug.scream Off Off
xdebug.show_exception_trace Off Off
xdebug.show_local_vars Off Off
xdebug.show_mem_delta Off Off
xdebug.trace_enable_trigger Off Off
xdebug.trace_format 0 0
xdebug.trace_options 0 0
xdebug.trace_output_dir /var/tmp/ /var/tmp/
xdebug.trace_output_name trace.%c trace.%c
xdebug.var_display_max_children 128 128
xdebug.var_display_max_data 2048 2048
xdebug.var_display_max_depth 128 128


When I try and use the zero configuration mode, I get no reaction from phpstorm in any way.

When I try to use the debug configuration, I get the phpstorm to connect to page, but no breakpoints are respected. Not even "Break at first line.."

Here's my xdebug config

zend_extension=/usr/local/php5-5.5.8-20140112-185654/lib/php/extensions/no-debug-non-zts-20121212/xdebug.so
[xdebug]
xdebug.idekey=PHPSTORM
xdebug.remote_enable=on
xdebug.default_enable=on
xdebug.remote_autostart=off
xdebug.remote_port=9000
xdebug.remote_host=localhost
xdebug.profiler_enable_trigger=1
xdebug.profiler_output_name=xdebug-profile-cachegrind.out-%H-%R
xdebug.var_display_max_children = 128
xdebug.var_display_max_data = 2048
xdebug.var_display_max_depth = 128


I got this working briefly (thou I have no idea as to how, but some config worked with zero config), but not recently after latest update.

I'm pretty sure that there's something wrong with my configs, but for the life of me I can't figure out what it is.

This is REALLY important thing form me to get working.

Thanks for any help.

/ Janne

0

Your xdebug is configured correctly.

Now, your "does not work" does not help here at all as it provides no info on what could possibly be wrong, unfortunately.

Therefore --- collect (and attach here) some logs to see xdebug's and PhpStorm's interaction:


As I understand, the IDE and actual web server are located on the same computer/OS (i.e. nothing is virtual/remote)?

P.S.
It's good idea to clear idea.log before doing all that (smaller log that contains only relevant info -- no "junk" from previous sessions) -- "Help | Show log in..."

P.P.S.
Some basic screencast (or, at very least, a bunch of screenshots of whole screen) would be extremely handy.

0
Avatar
Permanently deleted user

Ok, I thought that xdebug was configured properly.

I sort of understand that "does not work" isn't very helpful, but that's what I'm getting from phpstorm. Everything seems to be fine, but it's just not working.

And yes, this is local environment, with OSX Mavericks and homebrewed php 5.5.8.

About logs...

I configured phpstorm logging as you told, and here's the result. I emptied that file before running anything.

2014-06-27 15:29:19,329 [      0]   INFO -        #com.intellij.idea.Main - ------------------------------------------------------ IDE STARTED ------------------------------------------------------
2014-06-27 15:29:19,359 [     30]   INFO -        #com.intellij.idea.Main - IDE: PhpStorm (build #PS-133.982, 25 Feb 2014 00:00)
2014-06-27 15:29:19,360 [     31]   INFO -        #com.intellij.idea.Main - OS: Mac OS X (10.9.3, x86_64)
2014-06-27 15:29:19,360 [     31]   INFO -        #com.intellij.idea.Main - JRE: 1.6.0_65-b14-462-11M4609 (Apple Inc.)
2014-06-27 15:29:19,360 [     31]   INFO -        #com.intellij.idea.Main - JVM: 20.65-b04-462 (Java HotSpot(TM) 64-Bit Server VM)
2014-06-27 15:29:19,365 [     36]   INFO -        #com.intellij.idea.Main - JVM Args: -Dfile.encoding=UTF-8 -ea -Dsun.io.useCanonCaches=false -Djava.net.preferIPv4Stack=true -XX:+UseCodeCacheFlushing -XX:+UseConcMarkSweepGC -XX:SoftRefLRUPolicyMSPerMB=50 -Xverify:none -Xbootclasspath/a:../lib/boot.jar -Xms128m -Xmx750m -XX:MaxPermSize=350m -XX:ReservedCodeCacheSize=96m -XX:+UseCompressedOops -Didea.java.redist=NoJavaDistribution -Didea.platform.prefix=PhpStorm -Didea.paths.selector=WebIde70 -Dsun.java2d.noddraw=true -Didea.max.intellisense.filesize=2500 -Didea.no.jre.check=true -Didea.dynamic.classpath=false -Dnative.mac.file.chooser.enabled=true -Didea.jars.nocopy=true -Dsun.java2d.d3d=false -Dapple.awt.fullscreencapturealldisplays=false -Dapple.laf.useScreenMenuBar=true -Djava.endorsed.dirs= -Dswing.bufferPerWindow=false -Didea.fatal.error.notification=disabled -Didea.cycle.buffer.size=1024 -Dide.mac.show.native.help=false -Didea.popup.weight=heavy -Dapple.awt.graphics.UseQuartz=true -Dsun.java2d.pmoffscreen=false -Didea.no.launcher=false -DCVS_PASSFILE=~/.cvspass -Didea.use.default.antialiasing.in.editor=false -Dcom.apple.mrj.application.live-resize=false -Didea.smooth.progress=false
2014-06-27 15:29:19,423 [     94]   INFO -        #com.intellij.idea.Main - JNA library loaded (64-bit) in 57 ms
2014-06-27 15:29:19,463 [    134]   INFO -        #com.intellij.idea.Main - Snappy library loaded (1.0.5) in 39 ms
2014-06-27 15:29:19,468 [    139]   INFO -        #com.intellij.idea.Main - initializing environment
2014-06-27 15:29:19,469 [    140]   INFO - .intellij.util.EnvironmentUtil - loading shell env: /bin/bash -l -c '/Applications/PhpStorm.app/bin/printenv.py' '/private/var/folders/0s/4pqvgtqd3g7fs0sdx1gnbc_c0000gn/T/intellij-shell-env3554550738477697525.tmp'
2014-06-27 15:29:20,248 [    919]   INFO - .intellij.util.EnvironmentUtil - shell environment loaded (19 vars)
2014-06-27 15:29:20,599 [   1270]   INFO - llij.ide.plugins.PluginManager - Cannot find optional descriptor intellilang-python-support.xml
2014-06-27 15:29:20,614 [   1285]   INFO - llij.ide.plugins.PluginManager - Cannot find optional descriptor intellilang-python-support.xml
2014-06-27 15:29:21,364 [   2035]   INFO - llij.ide.plugins.PluginManager - 49 plugins initialized in 1066 ms
2014-06-27 15:29:21,364 [   2035]   INFO - llij.ide.plugins.PluginManager - Loaded bundled plugins: ASP (0.1), Apache config (.htaccess) support (133.982), CSS Support, CVS Integration (11), CoffeeScript (2.0), Command Line Tool Support (133.982), Database Support (1.0), Drupal Support (133.982), File Watchers (999.999), Framework MVC Structure Support (133.982), GNU GetText files support (*.po) (134.SNAPSHOT), Gherkin (1.2), Git Integration (8.1), GitHub, Google App Engine Support for PHP (133.982), HAML, HTML Tools (2.0), IDEA CORE, Ini4Idea (133.982), Inspection-JS (2.0), IntelliLang (8.0), Java Server Pages Integration (1.0), JavaScript Debugger (1.0), JavaScript Intention Power Pack (0.9.4), JavaScript Support (1.0), LESS support, PHP (133.982), Perforce Integration (2.0), Phing Support (133.982), QuirksMode, REST Client, ReStructuredText Support (134.SNAPSHOT), Refactor-X (2.01), Remote Hosts Access (0.1), SASS support, SQL support (1.0), SSH Remote Run (0.1), Subversion Integration (1.1), Task Management (1.0), Terminal (0.1), TextMate bundles support (VERSION), Twig Support (133.982), UML Support (1.0), Vagrant (133.982), W3C Validators (2.0), XPathView + XSLT Support (4), XSLT-Debugger (1.4), YAML, hg4idea (10.0)
2014-06-27 15:29:21,726 [   2397]   INFO - ellij.util.io.PagedFileStorage - lower=100; upper=200; buffer=10; max=756744192
2014-06-27 15:29:21,812 [   2483]   INFO - api.vfs.impl.local.FileWatcher - Starting file watcher: /Applications/PhpStorm.app/bin/fsnotifier
2014-06-27 15:29:21,831 [   2502]   INFO - api.vfs.impl.local.FileWatcher - Native file watcher is operational.
2014-06-27 15:29:23,014 [   3685]   INFO - lij.diagnostic.DebugLogManager - Set DEBUG for the following categories: [com.jetbrains.php.debug, com.jetbrains.plugins.webDeployment]
2014-06-27 15:29:23,358 [   4029]   INFO - s.impl.stores.FileBasedStorage - Document was not loaded for $APP_CONFIG$/macros.xml file is null
2014-06-27 15:29:23,364 [   4035]   INFO - s.impl.stores.FileBasedStorage - Document was not loaded for $APP_CONFIG$/quicklists.xml file is null
2014-06-27 15:29:24,610 [   5281]   INFO - s.impl.stores.FileBasedStorage - Document was not loaded for $APP_CONFIG$/terminal.xml file is null
2014-06-27 15:29:24,635 [   5306]   INFO - pl.stores.ApplicationStoreImpl - 81 application components initialized in 3256 ms
2014-06-27 15:29:24,930 [   5601]   INFO - .intellij.idea.IdeaApplication - App initialization took 6249 ms
2014-06-27 15:29:25,033 [   5704]   INFO - s.impl.stores.FileBasedStorage - Document was not loaded for $APP_CONFIG$/customization.xml file is null
2014-06-27 15:29:25,071 [   5742]   INFO - om.intellij.util.ProfilingUtil - Profiling agent is not enabled. Add -agentlib:yjpagent to idea.vmoptions if necessary to profile IDEA.
2014-06-27 15:29:25,119 [   5790]   WARN - j.ui.mac.MacMainFrameDecorator - no url bundle present.
To use platform protocol handler to open external links specify required protocols in the mac app layout section of the build file
Example: args.urlSchemes = ["your-protocol"] will handle following links: your-protocol://open?file=file&line=line
2014-06-27 15:29:25,979 [   6650]   INFO - s.impl.stores.FileBasedStorage - Document was not loaded for $APP_CONFIG$/plainTextFiles.xml file is null
2014-06-27 15:29:26,105 [   6776]   INFO - s.impl.stores.FileBasedStorage - Document was not loaded for $PROJECT_CONFIG_DIR$/frameworkRootSettings.xml file is null
2014-06-27 15:29:26,210 [   6881]   INFO - ellij.project.impl.ProjectImpl - 124 project components initialized in 796 ms
2014-06-27 15:29:26,239 [   6910]   INFO - le.impl.ModuleManagerComponent - 1 module(s) loaded in 29 ms
2014-06-27 15:29:26,979 [   7650]   INFO - .roots.impl.DirectoryIndexImpl - Directory index initialized in 446 ms, indexed 1076 directories
2014-06-27 15:29:26,995 [   7666]   INFO - s.impl.stores.FileBasedStorage - Document was not loaded for $PROJECT_CONFIG_DIR$/sqldialects.xml file is null
2014-06-27 15:29:27,415 [   8086]   INFO - pl.PushedFilePropertiesUpdater - File properties pushed in 423 ms
2014-06-27 15:29:27,632 [   8303]   INFO - s.impl.stores.FileBasedStorage - Document was not loaded for $PROJECT_CONFIG_DIR$/templateLanguages.xml file is null
2014-06-27 15:29:27,649 [   8320]   INFO - s.impl.stores.FileBasedStorage - Document was not loaded for $APP_CONFIG$/templateLanguages.xml file is null
2014-06-27 15:29:27,675 [   8346]   INFO - rains.ide.BuiltInServerManager - built-in server started, port 63342
2014-06-27 15:29:28,118 [   8789]   INFO - s.impl.stores.FileBasedStorage - Document was not loaded for $PROJECT_CONFIG_DIR$/codeStyleSettings.xml file is null
2014-06-27 15:29:28,119 [   8790]   INFO - s.impl.stores.FileBasedStorage - Document was not loaded for $PROJECT_CONFIG_DIR$/projectCodeStyle.xml file is null
2014-06-27 15:29:28,176 [   8847]   INFO - s.impl.stores.FileBasedStorage - Document was not loaded for $PROJECT_CONFIG_DIR$/fileColors.xml file is null
2014-06-27 15:29:28,345 [   9016]   INFO - indexing.UnindexedFilesUpdater - Indexable files iterated in 889 ms
2014-06-27 15:29:28,350 [   9021]   INFO - indexing.UnindexedFilesUpdater - Unindexed files update started: 0 files to update
2014-06-27 15:29:28,352 [   9023]   INFO - indexing.UnindexedFilesUpdater - Unindexed files update done in 1 ms
2014-06-27 15:29:28,897 [   9568]   INFO - s.impl.stores.FileBasedStorage - Document was not loaded for $PROJECT_CONFIG_DIR$/IntelliLang.xml file is null
2014-06-27 15:29:29,408 [  10079]   INFO - s.impl.stores.FileBasedStorage - Document was not loaded for $PROJECT_CONFIG_DIR$/phing.xml file is null
2014-06-27 15:29:29,651 [  10322]   INFO - s.impl.stores.FileBasedStorage - Document was not loaded for $PROJECT_CONFIG_DIR$/frameworkRootSettings.xml file is null
2014-06-27 15:29:29,663 [  10334]   INFO - ellij.project.impl.ProjectImpl - 124 project components initialized in 178 ms
2014-06-27 15:29:29,701 [  10372]   INFO - le.impl.ModuleManagerComponent - 1 module(s) loaded in 28 ms
2014-06-27 15:29:29,734 [  10405]   WARN - j.ui.mac.MacMainFrameDecorator - no url bundle present.
To use platform protocol handler to open external links specify required protocols in the mac app layout section of the build file
Example: args.urlSchemes = ["your-protocol"] will handle following links: your-protocol://open?file=file&line=line
2014-06-27 15:29:30,560 [  11231]   INFO - .roots.impl.DirectoryIndexImpl - Directory index initialized in 88 ms, indexed 901 directories
2014-06-27 15:29:30,562 [  11233]   INFO - s.impl.stores.FileBasedStorage - Document was not loaded for $PROJECT_CONFIG_DIR$/sqldialects.xml file is null
2014-06-27 15:29:30,613 [  11284]   INFO - pl.PushedFilePropertiesUpdater - File properties pushed in 52 ms
2014-06-27 15:29:30,633 [  11304]   INFO - s.impl.stores.FileBasedStorage - Document was not loaded for $PROJECT_CONFIG_DIR$/templateLanguages.xml file is null
2014-06-27 15:29:30,799 [  11470]   INFO - indexing.UnindexedFilesUpdater - Indexable files iterated in 176 ms
2014-06-27 15:29:30,799 [  11470]   INFO - indexing.UnindexedFilesUpdater - Unindexed files update started: 0 files to update
2014-06-27 15:29:30,799 [  11470]   INFO - indexing.UnindexedFilesUpdater - Unindexed files update done in 0 ms
2014-06-27 15:29:30,855 [  11526]   INFO - s.impl.stores.FileBasedStorage - Document was not loaded for $PROJECT_CONFIG_DIR$/codeStyleSettings.xml file is null
2014-06-27 15:29:30,855 [  11526]   INFO - s.impl.stores.FileBasedStorage - Document was not loaded for $PROJECT_CONFIG_DIR$/projectCodeStyle.xml file is null
2014-06-27 15:29:30,864 [  11535]   INFO - s.impl.stores.FileBasedStorage - Document was not loaded for $PROJECT_CONFIG_DIR$/fileColors.xml file is null
2014-06-27 15:29:31,325 [  11996]   INFO - ction.BrowserConnectionManager - Browser connected: version 2.0, CHROME
2014-06-27 15:29:31,778 [  12449]   INFO - s.impl.stores.FileBasedStorage - Document was not loaded for $PROJECT_CONFIG_DIR$/IntelliLang.xml file is null
2014-06-27 15:29:31,920 [  12591]   INFO - s.impl.stores.FileBasedStorage - Document was not loaded for $PROJECT_CONFIG_DIR$/phing.xml file is null
2014-06-27 15:29:32,030 [  12701]   INFO - s.impl.stores.FileBasedStorage - Document was not loaded for $PROJECT_CONFIG_DIR$/deployment.xml file is null
2014-06-27 15:29:32,038 [  12709]   INFO - s.impl.stores.FileBasedStorage - Document was not loaded for $PROJECT_CONFIG_DIR$/frameworkRootSettings.xml file is null
2014-06-27 15:29:32,054 [  12725]   INFO - ellij.project.impl.ProjectImpl - 124 project components initialized in 107 ms
2014-06-27 15:29:32,061 [  12732]   INFO - le.impl.ModuleManagerComponent - 1 module(s) loaded in 6 ms
2014-06-27 15:29:32,079 [  12750]   WARN - j.ui.mac.MacMainFrameDecorator - no url bundle present.
To use platform protocol handler to open external links specify required protocols in the mac app layout section of the build file
Example: args.urlSchemes = ["your-protocol"] will handle following links: your-protocol://open?file=file&line=line
2014-06-27 15:29:32,473 [  13144]   INFO - .roots.impl.DirectoryIndexImpl - Directory index initialized in 35 ms, indexed 903 directories
2014-06-27 15:29:32,474 [  13145]   INFO - s.impl.stores.FileBasedStorage - Document was not loaded for $PROJECT_CONFIG_DIR$/sqldialects.xml file is null
2014-06-27 15:29:32,492 [  13163]   INFO - pl.PushedFilePropertiesUpdater - File properties pushed in 18 ms
2014-06-27 15:29:32,505 [  13176]   INFO - s.impl.stores.FileBasedStorage - Document was not loaded for $PROJECT_CONFIG_DIR$/templateLanguages.xml file is null
2014-06-27 15:29:32,618 [  13289]   INFO - indexing.UnindexedFilesUpdater - Indexable files iterated in 119 ms
2014-06-27 15:29:32,618 [  13289]   INFO - indexing.UnindexedFilesUpdater - Unindexed files update started: 0 files to update
2014-06-27 15:29:32,618 [  13289]   INFO - indexing.UnindexedFilesUpdater - Unindexed files update done in 0 ms
2014-06-27 15:29:32,819 [  13490]   INFO - s.impl.stores.FileBasedStorage - Document was not loaded for $PROJECT_CONFIG_DIR$/codeStyleSettings.xml file is null
2014-06-27 15:29:32,820 [  13491]   INFO - s.impl.stores.FileBasedStorage - Document was not loaded for $PROJECT_CONFIG_DIR$/projectCodeStyle.xml file is null
2014-06-27 15:29:32,826 [  13497]   INFO - s.impl.stores.FileBasedStorage - Document was not loaded for $PROJECT_CONFIG_DIR$/fileColors.xml file is null
2014-06-27 15:29:32,873 [  13544]   INFO - s.impl.stores.FileBasedStorage - Document was not loaded for $PROJECT_CONFIG_DIR$/IntelliLang.xml file is null
2014-06-27 15:29:33,154 [  13825]   INFO - s.impl.stores.FileBasedStorage - Document was not loaded for $PROJECT_CONFIG_DIR$/phing.xml file is null
2014-06-27 15:29:34,260 [  14931]   INFO - s.impl.stores.FileBasedStorage - Document was not loaded for $PROJECT_CONFIG_DIR$/webResources.xml file is null
2014-06-27 15:29:38,042 [  18713]   INFO - s.impl.stores.FileBasedStorage - Document was not loaded for $PROJECT_CONFIG_DIR$/webResources.xml file is null
2014-06-27 15:29:38,227 [  18898]   INFO - tor.impl.FileEditorManagerImpl - Project opening took 12846 ms
2014-06-27 15:29:38,786 [  19457]   INFO - tor.impl.FileEditorManagerImpl - Project opening took 9718 ms
2014-06-27 15:29:39,139 [  19810]   INFO - s.impl.stores.FileBasedStorage - Document was not loaded for $PROJECT_CONFIG_DIR$/webResources.xml file is null
2014-06-27 15:29:39,151 [  19822]   INFO - tor.impl.FileEditorManagerImpl - Project opening took 7284 ms
2014-06-27 15:30:09,195 [  49866]   INFO - s.impl.stores.FileBasedStorage - Document was not loaded for $APP_CONFIG$/intentionSettings.xml file is null
2014-06-27 15:30:10,293 [  50964]   INFO - ellij.project.impl.ProjectImpl - 20 project components initialized in 10 ms
2014-06-27 15:30:10,293 [  50964]   INFO - le.impl.ModuleManagerComponent - 0 module(s) loaded in 0 ms
2014-06-27 15:30:36,884 [  77555]   INFO - il.connection.ServerConnection - Stopped listening on port 9000
2014-06-27 15:30:36,884 [  77555]   INFO - il.connection.ServerConnection - Stopped listening on port 20080
2014-06-27 15:30:36,884 [  77555]   INFO - il.connection.ServerConnection - Stopped listening on port 10137
2014-06-27 15:30:44,588 [  85259]   INFO - s.impl.stores.FileBasedStorage - Document was not loaded for $APP_CONFIG$/consoleFolding.xml file is null


I also added this line to xebug config:

xdebug.remote_log = /Users/janne/Downloads/xdebug.log

..but get nothing printed.

About screenshots, what screens you need to get info you need to help me?

I took some random screens, maybe there's something for you to work with..

validate_remote.pngdebug_setup.pngserver_setup.pngdebug_log_setup.png

Cheers,

Janne

0

1) Have you tried to debug? The PhpStorm's log shows nothing.

Please describe (in details) how you debug (what do you you click etc -- step by step). Restart IDE, open your project (restart browser if desired) and start from there.


2) The "zero-config approach" suggests that it will create entry at "Preferences | PHP | Servers" for you (will show dialog box when debug connection will be established).

I see that you have made such entry yourself. There is nothing wrong with it ... except that is it configured WRONGLY.

Why .. why people are trying to put "http://my-domain.com/" kind of text in "Host" field? Why? "Host" (domain name) is NOT the same as "URL".

It should be just "my-domain.com" without protocol or port numbers -- even help page says that: "Host:                               In this text box, type the name of the host where the target application is deployed."


3) In any case: #2 can be ignored .. since IDE does not receive any debug connections (as you have said yourself -- xdebug log is empty).

This means that xdebug does not see your "debug this" flag (usually a cookie or GET/POST parameter) -- this is what bookmarklets or browser extension does -- it sets such cookie so it will be sent with next page request which xdebug will see and act accordingly.

If you are unable to use bookmarklet/browser extension/whatever-else for some reason (forgeting-about-it/cannot-be-bothered/it-does-not-work-for-some-strange-reason/etc) .. just configure xdebug to ALWAYS attempt to debug EVERY SINGLE request via "xdebug.remote_autostart = 1" (the cost would be around 0.7-1 sec delay when executing scripts when not listening for debug connections)


P.S.

You may need to restart Apache to have changes in php.ini to have effect.

0
Avatar
Permanently deleted user

Hello, I never start a post elsewhere. This is my only post. Anyways Here is my phpinfo for xdebug.
I did use zero-configure. It didn't work either.

xdebug

xdebug support enabled
Version 2.2.5
IDE Key JIANSU-PC$

Supported protocols Revision
DBGp - Common DeBuGger Protocol $Revision: 1.145 $

Directive Local Value Master Value
xdebug.auto_trace Off Off
xdebug.cli_color 0 0
xdebug.collect_assignments Off Off
xdebug.collect_includes On On
xdebug.collect_params 0 0
xdebug.collect_return Off Off
xdebug.collect_vars Off Off
xdebug.coverage_enable On On
xdebug.default_enable On On
xdebug.dump.COOKIE no value no value
xdebug.dump.ENV no value no value
xdebug.dump.FILES no value no value
xdebug.dump.GET no value no value
xdebug.dump.POST no value no value
xdebug.dump.REQUEST no value no value
xdebug.dump.SERVER no value no value
xdebug.dump.SESSION no value no value
xdebug.dump_globals On On
xdebug.dump_once On On
xdebug.dump_undefined Off Off
xdebug.extended_info On On
xdebug.file_link_format no value no value
xdebug.idekey no value no value
xdebug.max_nesting_level 100 100
xdebug.overload_var_dump On On
xdebug.profiler_aggregate Off Off
xdebug.profiler_append Off Off
xdebug.profiler_enable Off Off
xdebug.profiler_enable_trigger Off Off
xdebug.profiler_output_dir d:/wamp/tmp d:/wamp/tmp
xdebug.profiler_output_name cachegrind.out.%t.%p cachegrind.out.%t.%p
xdebug.remote_autostart Off Off
xdebug.remote_connect_back Off Off
xdebug.remote_cookie_expire_time 3600 3600
xdebug.remote_enable Off Off
xdebug.remote_handler dbgp dbgp
xdebug.remote_host localhost localhost
xdebug.remote_log no value no value
xdebug.remote_mode req req
xdebug.remote_port 8080 8080
xdebug.scream Off Off
xdebug.show_exception_trace Off Off
xdebug.show_local_vars Off Off
xdebug.show_mem_delta Off Off
xdebug.trace_enable_trigger Off Off
xdebug.trace_format 0 0
xdebug.trace_options 0 0
xdebug.trace_output_dir \ \
xdebug.trace_output_name trace.%c trace.%c
xdebug.var_display_max_children 128 128
xdebug.var_display_max_data 512 512
xdebug.var_display_max_depth 3 3
0

No wonders that it does not work -- xdebug is NOT enabled

xdebug.remote_enable Off Off


Another question: why 8080 ?

xdebug.remote_port 8080 8080
0
Avatar
Permanently deleted user

Thank you the information. I edited the php.ini file and here is the change

;;;;;;;;;;;;;;;;;;;
; Module Settings ;
;;;;;;;;;;;;;;;;;;;
[xdebug]
xdebug.remote_host=localhost
xdebug.remote_enable=1
xdebug.remote_handler=dbgp
xdebug.remote_port=8080

Is it how you enable it? The reason i set 8080 is because my skype is actively listen to port 80, so i switch it to 8080 to resolve the conflict.
sorry for some newbie questions, I just purchased phpstorm and I am not familiar with the settings.

0
Is it how you enable it?

Yes -- xdebug.remote_enable=1 -- just as described in very first link I gave you -- http://confluence.jetbrains.com/display/PhpStorm/Xdebug+Installation+Guide

The reason i set 8080 is because my skype is actively listen to port 80, so i switch it to 8080 to resolve the conflict.

And what it has to do with xdebug? The port on which you run your Apache does not matter -- AT ALL.

Please -- read the xdebug manual ([1], [2]) about what xdebug.remote_port does.

The links I gave you (2 first links) in my original reply -- they are enough to have it working on localhost.

sorry for some newbie questions, I just purchased phpstorm and I am not familiar with the settings.

So far it has nothing to do with PhpStorm. So far it's just about configuring xdebug to be able to debug.

0
Avatar
Permanently deleted user

Bazzik wrote:

1) Have you tried to debug? The PhpStorm's log shows nothing.


Umm... Yes? How would I know that debugger isn't working if I hadn't tried it? Just a tad condesending?

Anyways..

Please describe (in details) how you debug (what do you you click etc -- step by step). Restart IDE, open your project (restart browser if desired) and start from there.


Ok, restarted IDE and Firefox. Removed old booklets, and added ones from the link you provided.

Step 1.
Press button on IDE to start listening connections. (Apparently there is some config still, but don't know how to remove that or if it's intefering here.)
start_listen.png
Step 2.
Open local dev site for debugging.

Step 3.
Click newly created bookmarklet to start debugging.
start_debug.png

Step 4.
Set breakpoint in code.
set_breakpoint.png
Step 5.
Refresh page and hope PHPSTORM catches breakpoint. Nothing. File being debugged is index.php of Drupal installation.

I see that you have made such entry yourself. There is nothing wrong with it ... except that is it configured WRONGLY.

Why .. why people are trying to put "http://my-domain.com/" kind of text in "Host" field? Why? "Host" (domain name) is NOT the same as "URL".

Yes, I've tried just about every configuration imaginable to me to get this work, to no avail. If it is configured compeletely WRONG, I'm inclined to think there IS something wrong with it.

My advice to the writer of those help pages would be that maybe it would be worthwhile to mention that the protocol part breaks thing up if it does so. While it may because I don't understand something in the help pages, if you find yourself writing something like "why ppl are trying..." often, the answer might just be that ppl are not getting the info as intended from those help pages.

If you are unable to use bookmarklet/browser extension/whatever-else for some reason (forgeting-about-it/cannot-be-bothered/it-does-not-work-for-some-strange-reason/etc) .. just configure xdebug to ALWAYS attempt to debug EVERY SINGLE request via "xdebug.remote_autostart = 1" (the cost would be around 0.7-1 sec delay when executing scripts when not listening for debug connections)


I will try this next. And yes, I have restarted Apache every time I've changed the php.ini or web server configuration.

IMHO debugging PHP shouldn't be this difficult.

Cheers,

Janne
0
Avatar
Permanently deleted user

Setting that xdebug.remote_autostart=on had no effect. No logs, no debug, nothing.

It's as if xdebug is non-exestent for PHPSTORM debugger.

Is there any configs to check apart from the ones mentioned here.

It can't be because of browser, because I've tried with Chrome & Firefox and neither is working. Same with profiler.

And I had xdebug + PHPSTORM working just fine on my laptop before SSD on that died and I had to reinstall everything. Since then this hasn't been working on any machine. This main machine is 2012 iMac running Mavericks, laptop is 2013 MBP running Mountain Lion. Same PHPSTORM + xdebug versions.

Cheers,

Janne

0

Setting that xdebug.remote_autostart=on had no effect. No logs, no debug, nothing.

That is the problem -- xdebug always writes into log (if configured so) BEFORE establishing connection. And this option -- remote_autostart -- tells xdebug to attempt to debug every single script regardless of how it was initiated.

So .. I would expect to see something there.

Can you please double check that:

  • the log file option points to a correct place
  • it has enough access rights to be written by any user

It's as if xdebug is non-exestent for PHPSTORM debugger.

So far it's about xdebug only -- if xdebug is unable to initiate .. then PhpStorm is not even get contacted.

Is there any configs to check apart from the ones mentioned here.

Not many ideas, except:

  • try another xdebug build (re-download this one .. or try older version)
  • will it do any different if you trigger debugging programmatically by placing xdebug_break(); into your code?


Suggestion:

  • same project .. or brand new project
  • create simple PHP scipt with couple of basic 1-line instructions -- e.g. $a = 5; $b = 3; $c = $a + $b; echo $c; (one instuction per line)
  • try to debug it in CLI mode (Run/Debug configuration of "PHP Script" type). IDE will provide all parameters required as parameters to PHP interpreter.
  • if it works -- try debugging it via browser.


P.S.
On Linux/Mac you may have dfferent php.ini files for web/cli modes (which one is used is available in the header of php_info() output -- so check xdebug settings with "php -i" for cli mode.

It can't be because of browser, because I've tried with Chrome & Firefox and neither is working. Same with profiler.

Considering that remote_autostart does not help -- it sounds like xdebug issue then (whatever it may be). I would definitely recommend trying another xdebug build.

Step 1.
Press button on IDE to start listening connections. (Apparently there is some config still, but don't know how to remove that or if it's intefering here.)

You do not need any configs if you do Zero-Config approach.

Any way: if you are talking about entries in drop-down box then they can be edited/removed by choosing "Edit Configurations.." options in that drop-down or "Run | Edit Configurations...".

In any case -- all steps are good (I was hoping maybe you have missed something by mistake .. but all seems to be OK)

0

Could you also provide the top part (all that goes before individual modules settings) of the php_info() output, please.

0
Avatar
Permanently deleted user

Ok, apaarently there WAS some sort of issue writing that log to my downloads -folder, since after I pointed log path to /var/log, it started to log stuff. Not much, but something:

Log opened at 2014-06-30 11:48:12
I: Connecting to configured address/port: localhost:9000.
I: Connected to client. :-)
-> <init xmlns="urn:debugger_protocol_v1" xmlns:xdebug="http://xdebug.org/dbgp/xdebug" fileuri="file:///Users/janne/Sites/d7/kehitys_boogi_2406/index.php" language="PHP" protocol_version="1.0" appid="78097" idekey="PHPSTORM"><engine version="2.2.5"><![CDATA[Xdebug]]></engine><author><![CDATA[Derick Rethans]]></author><url><![CDATA[http://xdebug.org]]></url><copyright><![CDATA[Copyright (c) 2002-2014 by Derick Rethans]]></copyright></init>

-> <response xmlns="urn:debugger_protocol_v1" xmlns:xdebug="http://xdebug.org/dbgp/xdebug" status="stopping" reason="ok"></response>

Log closed at 2014-06-30 11:48:16

Log opened at 2014-06-30 11:48:16
I: Connecting to configured address/port: localhost:9000.
I: Connected to client. :-)
-> <init xmlns="urn:debugger_protocol_v1" xmlns:xdebug="http://xdebug.org/dbgp/xdebug" fileuri="file:///Users/janne/Sites/d7/kehitys_boogi_2406/index.php" language="PHP" protocol_version="1.0" appid="78098" idekey="PHPSTORM"><engine version="2.2.5"><![CDATA[Xdebug]]></engine><author><![CDATA[Derick Rethans]]></author><url><![CDATA[http://xdebug.org]]></url><copyright><![CDATA[Copyright (c) 2002-2014 by Derick Rethans]]></copyright></init>

Log opened at 2014-06-30 11:48:17
I: Connecting to configured address/port: localhost:9000.
I: Connected to client. :-)
-> <init xmlns="urn:debugger_protocol_v1" xmlns:xdebug="http://xdebug.org/dbgp/xdebug" fileuri="file:///Users/janne/Sites/d7/kehitys_boogi_2406/index.php" language="PHP" protocol_version="1.0" appid="78095" idekey="PHPSTORM"><engine version="2.2.5"><![CDATA[Xdebug]]></engine><author><![CDATA[Derick Rethans]]></author><url><![CDATA[http://xdebug.org]]></url><copyright><![CDATA[Copyright (c) 2002-2014 by Derick Rethans]]></copyright></init>

No change wheter or not I have breakpoint in code.

So something IS happening here after all.

Phpinfo stuff:

PHP Version 5.5.8

php-osx.liip.ch by Liip (originally developed by www.local.ch)

System Darwin jiimac.local 13.2.0 Darwin Kernel Version 13.2.0: Thu Apr 17 23:03:13 PDT 2014; root:xnu-2422.100.13~1/RELEASE_X86_64 x86_64
Build Date Jan 12 2014 18:47:21
Configure Command './configure' '--prefix=/usr/local/php5' '--with-apxs2=/usr/sbin/apxs' '--with-config-file-scan-dir=/usr/local/php5/php.d' '--with-openssl=/usr' '--with-zlib=/usr' '--with-zlib-dir=/usr' '--with-gd' '--with-ldap' '--with-xmlrpc' '--enable-exif' '--enable-soap' '--enable-sqlite-utf8' '--enable-wddx' '--enable-ftp' '--enable-sockets' '--with-bz2=/usr' '--enable-zip' '--enable-shmop' '--enable-sysvsem' '--enable-sysvshm' '--enable-sysvmsg' '--enable-mbstring' '--enable-bcmath' '--enable-calendar' '--with-iodbc' '--with-mhash' '--enable-fpm' '--with-mysql=mysqlnd' '--with-mysqli=mysqlnd' '--with-pdo-mysql=mysqlnd' '--enable-pcntl' '--enable-dtrace' '--enable-opcache' '--with-icu-dir=/usr/local/php5' '--with-mssql=shared,/usr/local/php5' '--with-pdo-dblib=shared,/usr/local/php5' '--with-libxml-dir=shared,/usr/local/php5' '--with-xsl=shared,/usr/local/php5' '--with-imap=../imap-2007f' '--with-kerberos=/usr' '--with-imap-ssl=/usr' '--with-gettext=/usr/local/php5' '--with-curl=shared,/usr/local/php5' '--with-png-dir=/usr/local/php5' '--with-jpeg-dir=/usr/local/php5' '--enable-gd-native-ttf' '--with-freetype-dir=/usr/local/php5' '--with-pgsql=shared,/usr/local/php5' '--with-pdo-pgsql=shared,/usr/local/php5' '--with-mcrypt=shared,/usr/local/php5' '--with-tidy=/usr/local/php5' '--with-gmp=shared,/usr/local/php5' '--with-readline=shared,/usr/local/php5'
Server API Apache 2.0 Handler
Virtual Directory Support disabled
Configuration File (php.ini) Path /usr/local/php5/lib
Loaded Configuration File /usr/local/php5/lib/php.ini
Scan this dir for additional .ini files /usr/local/php5/php.d
Additional .ini files parsed /usr/local/php5/php.d/10-extension_dir.ini, /usr/local/php5/php.d/20-extension-opcache.ini, /usr/local/php5/php.d/50-extension-apcu.ini, /usr/local/php5/php.d/50-extension-curl.ini, /usr/local/php5/php.d/50-extension-gmp.ini, /usr/local/php5/php.d/50-extension-igbinary.ini, /usr/local/php5/php.d/50-extension-intl.ini, /usr/local/php5/php.d/50-extension-mcrypt.ini, /usr/local/php5/php.d/50-extension-memcache.ini, /usr/local/php5/php.d/50-extension-memcached.ini, /usr/local/php5/php.d/50-extension-mongo.ini, /usr/local/php5/php.d/50-extension-mssql.ini, /usr/local/php5/php.d/50-extension-oauth.ini, /usr/local/php5/php.d/50-extension-pdo_dblib.ini, /usr/local/php5/php.d/50-extension-pdo_pgsql.ini, /usr/local/php5/php.d/50-extension-pgsql.ini, /usr/local/php5/php.d/50-extension-readline.ini, /usr/local/php5/php.d/50-extension-redis.ini, /usr/local/php5/php.d/50-extension-solr.ini, /usr/local/php5/php.d/50-extension-ssh2.ini, /usr/local/php5/php.d/50-extension-twig.ini, /usr/local/php5/php.d/50-extension-uploadprogress.ini, /usr/local/php5/php.d/50-extension-xdebug.ini, /usr/local/php5/php.d/50-extension-xhprof.ini, /usr/local/php5/php.d/50-extension-xsl.ini, /usr/local/php5/php.d/99-liip-developer.ini
PHP API 20121113
PHP Extension 20121212
Zend Extension 220121212
Zend Extension Build API220121212,NTS
PHP Extension Build API20121212,NTS
Debug Build no
Thread Safety disabled
Zend Signal Handling disabled
Zend Memory Manager enabled
Zend Multibyte Support provided by mbstring
IPv6 Support enabled
DTrace Support enabled
Registered PHP Streams https, ftps, compress.zlib, compress.bzip2, php, file, glob, data, http, ftp, phar, zip, ssh2.shell, ssh2.exec, ssh2.tunnel, ssh2.scp, ssh2.sftp
Registered Stream Socket Transports tcp, udp, unix, udg, ssl, sslv3, sslv2, tls
Registered Stream Filters zlib.*, bzip2.*, convert.iconv.*, string.rot13, string.toupper, string.tolower, string.strip_tags, convert.*, consumed, dechunk, mcrypt.*, mdecrypt.*

Zend logoThis program makes use of the Zend Scripting Language Engine:
Zend Engine v2.5.0, Copyright (c) 1998-2013 Zend Technologies
    with Zend OPcache v7.0.3-dev, Copyright (c) 1999-2013, by Zend Technologies
    with Xdebug v2.2.5, Copyright (c) 2002-2014, by Derick Rethans



Cheers,

Janne

0

1) Do you still have any entries at "Preferences | PHP | Servers"? If so -- please delete and let IDE help setting it up again.

2) Please try to debug simple script first (CLI mode; then via web). Once able to debug -- move to real site.

3) Your log has nothing about interaction with PhpStorm. Sounds like PhpStorm completely ignores connection. Could you please provide log from PhpStorm side?

But before that -- make sure that it is PhpStorm who listens on xdebug port (TCP 9000 by default). netstat should help here (after that "phone handle" icon is activated).

0
Avatar
Permanently deleted user
1) Do you still have any entries at "Preferences | PHP | Servers"? If so -- please delete and let IDE help setting it up again.


I deleted existing, but IDE doesn't do anything. Not sure I understand how it would help me out here.

2) Please try to debug simple script first (CLI mode; then via web). Once able to debug -- move to real site.


Don't undestand this either.. I have no idea how to debug from cli. It appears to be using same xdebug config than the "normal" mode.

xdebug_break();
phpinfo();

Tried this, didn't work. Want to help out understanding how this should work?

I also created an blank phpstorm project out of that simple script. No debugger initially present, but after I chose interpreter, I was able to set that zero config debugging, but nothing happens.

project_intre.pngproject_select_int.png

No server present for that new project.

But before that -- make sure that it is PhpStorm who listens on xdebug port (TCP 9000 by default). netstat should help here (after that "phone handle" icon is activated).


netstat | grep PHPSTORM gives nothing, same with lower case. Neither does netstat | grep 9000. So apparently PHPSTORM isn't listening at all? And I do have that green phone lit.

Hmm. This is getting interesting. Could I have missed something here?


Cheers,

Janne
0
Avatar
Permanently deleted user

Oh, and logs at all from PHPSTORM.

Janne

0
I deleted existing, but IDE doesn't do anything. Not sure I understand how it would help me out here.

In case if server entry is not configured peroperly (mainly "host" and other simple fields) .. the IDE should offer to create new entry and will fill all that with correct values (this does not include path mappings part)

Don't undestand this either.. I have no idea how to debug from cli.

Create Run/Debug configuration of "PHP Script" type and use Debug in that drop-down box in toolbar while this entry is selected.

screen02.png

Alternatively -- rigth click in file, Choose debug and the correct entry from the list, for example:

screen01.png

You do not need to use "phone handle" icon / Zero-Config when debugging CLI scripts. Just invoke debug from PhpStorm.

Tried this, didn't work. Want to help out understanding how this should work?

xdebug_break(); is prgrammatic breakpoint -- it tells xdebug to break at this line regardless if breakpoint is set or not.

netstat | grep PHPSTORM gives nothing, same with lower case. Neither does netstat | grep 9000. So apparently PHPSTORM isn't listening at all? And I do have that green phone lit.

Hmm. This is getting interesting. Could I have missed something here?

I'm not netstat expert, especially since I'm not using Mac (I'm on Windows) .. so cannot help too much here.

But this is what I see when PhpStorm's "phone handle" icon is ON.

screen03.png

The port used fro xdebug by PhpStorm can be changed at "Preferences | PHP | Debug" -- it is set to default 9000 by default. In one of your original screenshots it was set to 9000 already.

Maybe you do not see it there (in netstat) because of firewall issue. Do not know -- not Mac user unfortunately.

0
Avatar
Permanently deleted user
In case if server entry is not configured peroperly (mainly "host" and other simple fields) .. the IDE should offer to create new entry and will fill all that with correct values (this does not include path mappings part)



Nope. I have tried debugging after I deleted previous entry, but that PHP/Servers is empty. IDE hasn't prompted anything or added to that. Don't know why.

server_config.png

Create Run/Debug configuration of "PHP Script" type and use Debug in that drop-down box in toolbar while this entry is selected.



Nothing. No debugging even from here. Perhaps it's time to accept that xdebug is broken.

debug_config.png

But this is what I see when PhpStorm's "phone handle" icon is ON.


Yeah. I should have something similar, but nothing about phpstorm or port 9000.

Running out of ideas? I know I have a long time ago.

Cheers,

Janne
0
Nope. I have tried debugging after I deleted previous entry, but that PHP/Servers is empty. IDE hasn't prompted anything or added to that. Don't know why.

PhpStorm does not see incoming debug connection (for whatever reason). Hence the helper popup does not show up.

Nothing. No debugging even from here.

Well .. that's odd.

Running out of ideas? I know I have a long time ago.

Few ideas:

  1. Reinstall PhpStorm (the app -- leave settings intact). Try v7 as well as v8 EAP build.
  2. Delete ALL settings (backup them first). See if brand new settings (with no 3rd party plugins installed) will do any different. You can then restore old settings if desired.
  3. Double check your firewall -- it's odd (for me, not Mac user) that after activating "phone handle" icon the netstat does not show PhpStorm listening.
  4. Activate "phone handle" icon .. and try to connect to PhpStorm on that port via telnet. See if you can connect at all (your xdebug log shows that it connects .. but to where?). Try with that icon enabled as well as disabled. If it works with disable .. then some another service is listening.
  5. Try setting up different xdebug port (e.g. 10000 instead of default 9000) -- do it in both PhpStorm as well as php.ini


If still nothing .. and if you are interested -- I may try some remote desktop session (e.g. TeamViewer) -- maybe I'll be able to spot something. If interested -- email me at [myFirtName].[myLastName]@gmail.com

0
Avatar
Permanently deleted user

Yeah, thanks. I'll look into this when I get a second. But yes, I will definetly need this to work, so I'm all up for TeamViewer session if this doesn't get sorted soon.

But I have to some actual work atm, so I'll get back when I've tested sme more.

Cheers,

Janne

0

Please sign in to leave a comment.