PhpStorm showing "unvailable" breakpoint whereas execution is suspended - phpstorm

I'm sometimes stuck while attempting to debug my code.
Debug Session is active, code execution is suspended :
But I cannot see what really happens, as the breakpoint show "unavailable" ("no parking" symbol):
Does anybody know about this sign ?
I still haven't found any information about it on JetBrains sites... that's why I'm here :-)
(PhpStorm 2020.3, using docker containers (linux containers) with Docker Desktop/ Windows 10)
[EDIT] :
I just noticed that "break at first line in php script" seem to be functioning though:
But I have these weird breakpoints instead of red "normal" ones, and an highlighted line.
I tried restarting my docker containers, same issue. This produces seemingly randomly and gets solved after a while ... (reboot ?...)
[EDIT] SOLVED
The path mapping (local<->docker) for the root of my project was empty (how did it happen...) in my docker configuration in PhPStorm.
I'm not sure how this problem occured, but I'll be able to solve it next time if it's back.

If you try to disable "break at first line in php scripts" you may get the message :
17:38 Debug session was finished without being paused It may be
caused by path mappings misconfiguration or not synchronized local and
remote projects. To figure out the problem check path mappings
configuration for 'docker-server' server at PHP|Servers or enable
Break at first line in PHP scripts option (from Run menu). Do not
show again
In my case, the path mapping for the root of my project was incomplete "Absolute path on the server" was emtpy. I don't know how it happened but you could check :
In PHP | Servers

Related

Debug session was finished without being paused It may be caused by path mappings misconfiguration

I'm trying to use xdebug with phpStorm, valet on macOs
I followed the instructions,
installed xdebug, added configurations and set the settings in phpStorm
xdebug config parameters:
xdebug.remote_enable=1
xdebug.remote_port=9003
xdebug.idekey=PHPSTORM
xdebug.remote_log=/tmp/xdebug.log
I keep getting this error message and xdebug doesn't breach at the break points:
Debug session was finished without being paused
It may be caused by path mappings misconfiguration or not synchronized local and remote projects.
To figure out the problem check path mappings configuration for 'dashboard.test' server at PHP|Servers or enable Break at first line
in PHP scripts option (from Run menu).
Do not show again
this is my configuration details
I tried many suggested solutions but none of them is working,
Update:
changed the host from https://dashboard.test into dashboard.test, the message disappeared but still can not step over or step into every line (break point)

PhpStorm Debugger never enters code, but page doesn't finish loading while debugger is running

I am using PhpStorm on Ubuntu which I'm running on a Hyper-V machine. I'm trying to configure the PhpStorm debugger with XDebug. I've set a breakpoint in my code, but when I click "Start Listening for PHP Debug Connections" in PhpStorm and refresh my page, the debugger never enters my code. The debugger must be doing something because the page in the browser stays loading, until I click Stop in PhpStorm. If I don't click for the debugger to listen for connections, the page loads correctly.
The Debug window shows the error Remote file path '/var/www/magento2/pub/index.php' is not mapped to any file path in project, but I don't know how to get that to map correctly. In the path mappings windows, under "Include path", it shows a bunch of paths, but the path /var/www/magento2/pub isn't there. I can't find anywhere to add an additional path. Could this be a permissions issue for that folder? What permissions do I need to allow PhpStorm to map that path?
If I uncheck "use path mapping" in Preferences > Language & Framework > PHP > Servers and leave "Break at first line in PHP scripts" checked, then the debugger breaks on the first line of code, but I don't want to break until my breakpoint is hit.
If I uncheck "use path mapping" and don't check "Break at first line in PHP scripts", then I get the error Debug session was finished without being paused. It may be caused by path mappings misconfiguration or not synchronized local and remote projects. To figure out the problem check path mappings configuration for 'mydomain.local' server at PHP|Servers or enable Break at first line in PHP scripts option (from Run menu).
Here's my XDebug configuration
zend_extension=xdebug.so
xdebug.remote_autostart=1
xdebug.remote_enable=1
xdebug.remote_handler=dbgp
xdebug.remote_host=127.0.0.1
xdebug.remote_mode=req
xdebug.remote_port=9000
xdebug.var_display_max_depth=-1
xdebug.var_display_max_children=-1
xdebug.var_display_max_data=-1
xdebug.idekey="PHPSTORM"
Update:
Here are the responses to #LazyOne's questions
1) The path to the project root is /var/www/magento2
2)
One thing here which I think may be related to the problem is that under Include Path, the /var/www/magento/pub directory is not shown. That's what PhpStorm is referencing on that first error I described above. It's like PhpStorm found some of my directories with PHP files, but not all of them.
3) Here is the XDebug log
Update 2:
Here is what my project looks like
Here is my Directories window
I'm assuming that the reason that all the vendor/... directories are under Excluded Folders is that they are in .gitignore. Some of the code that I'm setting a breakpoint in is in a subdirectory of one of the vendor directories and some of the code is in a subdirectory of app/code/ (which is under Source Folders)
I added /var/www/magento2/pub to the Include Path under Settings > Languages & Frameworks > PHP. That eliminated the error about /var/www/magento2/pub/index.php. Now it's partially working. If I have PhpStorm break on the first line of PHP scripts, the debugger does start as soon as I refresh my page. However, after I step over the first line of code, I get the error PHP CS Fixer: Can not correctly run the tool with parameters... and then the debugger seems to stop working.
If I don't select Break at first line in PHP Scripts, and I put a breakpoint further into my code, I still get the same "debug session was finished without being paused" error.
I'm not sure what PHP CS Fixer is, nor do I want it to run. Is there a way to disable that?

Why can't I reach Glassfish admin gui?

Either I start Glassfish domain from NetBeans or from the asadmin console, I can't reach the admin panel.
When I navigate to http://localhost:4848, first there's a page saying "The Admin Console is starting. Please wait.", then it tries to redirect to a page having title "Login", but it loads, loads, loads forever. My CPU usage reaches 100% and nothing happens until I stop the server.
I tried Glassfish v3.1, v3.1.2 and also the freshest v4.0, without any modification.
About a year ago, v3.1 worked for me; I have no idea what could happen.
The server log says Glassfish can't find image files.
I uploaded the server log here: http://notepad.cc/share/LvaZvH23sF
I read somewhere that renaming the console-updatecenter-plugin.jar, and the NO_NETWORK=true option can solve similar problems, but these couldn't help for me.
I use JDK 7, and I'm on Windows 7 if it matters.
(edit) Summarizing what happened, from my past comments:
The admin panel was unreachable in Google Chrome and Internet Exlorer.
I managed to reach the admin panel in Firefox, and even in Chrome's incognito mode, but the cause was not AdBlock.
Chrome dev console complained about a 404 error.
After a while, I was able to reach the admin panel in Chrome, in normal mode too, so from that point I couldn't reproduce the problem.
Try access the console in this url: http://localhost:4848/login.jsf
In http://localhost:4848 redirect to http://localhost:4848/common/index.jsf and not work because the url not exists.
I noticed this in your log:
[2013-08-04T10:52:12.761+0200] [glassfish 4.0] [WARNING] [] [javax.enterprise.system.container.web.com.sun.web.security] [tid: _ThreadID=34 _ThreadName=admin-listener(2)] [timeMillis: 1375606332761] [levelValue: 900] [[
Context path from ServletContext: differs from path from bundle: /]]
Following that warning, there are a lot of info messages that the server can't find resources that it expects:
[2013-08-04T10:52:16.495+0200] [glassfish 4.0] [INFO] [] [com.sun.jsftemplating] [tid: _ThreadID=133 _ThreadName=admin-listener(6)] [timeMillis: 1375606336495] [levelValue: 800] [[
JSFT0004: The requested resource (/images/button/primary-mini-roll.gif) is not available.]]
...etc.
I'm curious as to how you installed the Glassfish servers. Did you use the windows installer? If you simply used the installer to update an existing Glassfish installation, an incorrect configuration could have been carried over.
The easiest solution to your problem is to download the ZIP distribution. Extract that to a new directory, start the asadmin tool via the command line and run the command:
asadmin> start-domain domain1
That should give you a completely fresh installation and should work without any problems. There's a good blog post here on getting started with Glassfish 4, it would be worth skimming through to make sure there's nothing you've missed.
not sure if this is still a problem but I got something similiar and I could resolve this by setting an admin password and enabling secure-admin (glassfish 3.1). Not sure if the secure-admin is necessary though, so setting a password might be enough.
download and extract glassfish zip
glassfish3/bin/asadmin start-domain
glassfish3/bin/asadmin change-admin-password (default is user "admin" with no password, so just hit [ENTER] two times)
glassfish3/bin/asadmin enable-secure-admin (might be skipped, just see what works for you)
glassfish3/bin/asadmin restart-domain
Now the admin-gui should be available on http://localhost:4848 and also from other machines via http://your.ip.or.address:4848
Good luck
I've had this happen to me when I enable "Default Principal To Role Mapping":
After I enable this and restart the domain, I'm never able to login again. I had to change the following line on domain.xml (with the domain stopped) :
<security-service default-principal-password="admin" activate-default-principal-to-role-mapping="true" default-principal="admin">
to this:
<security-service>
I didn't find any serious error in your log. Maybe another program doesn't let GlassFish works correctly. For example antivirus.
Had a similar problem.
It happened when I put a primefaces 5.x jar file in my /JAVA_HOME/jre/lib/ext directory and when I removed it all went back to normal.
Through research I found that apparently the admingui clashes with some "3rd party JSF helper stuff".
Hope this helps somebody.
When Running on Chrome you may get this error due to this issue. https://github.com/eclipse-ee4j/glassfish/issues/22439
Admin gui is accessible on Firefox though.
Try this : http://mike.meessen.biz/blog/?p=281
I had exact
first there's a page saying "The Admin Console is starting. Please
wait.", then it tries to redirect to a page having title "Login", but
it loads, loads, loads forever.
problem and it worked for me.
I was in a similar situation and I found that in FF I cannot get access to console but in IE and Chrome with http://localhost:4848/login.jsf I can.
In Eclipse stopping the server and cleaning maybe will help. Afterwards you can access it via http://localhost:4848/common/index.jsf
The solution is quite simple.
There is an apllication/project that you were working on that had some errors. Simply undeploy them using the following procedure:
1.Go to Services tab then Servers then Glassfish Server 4.1
2.Right click on Glassfish Server 4.1 and click on the dropdown to list what under Glassfish Servers.
3.Expand Applications and undeploy all applications to start full receovery of the admin console.
4.Start Glassfish
5.Launch the admin console
Make your domain writeable thats the key guys
it ll work no need to other kinda wierd stuff

Internal error occured due to hg in eclipse

I get the following errors whenever I start a new project in eclipse.
One thing to observe is the strange path at the last, which i dont know why, comes always in the error message.
ps: the greyed out area is my username.
It looks like you are running Windows 7. Check the security settings on the folders you are working with and make sure that your user has the appropriate permissions on them.

Jenkins/Hudson fails when trying to retrieve code from CVS

Trying to configure Jenkins CI. Currently just running it from the .war (eventual intention as a service). Jenkins is aware of the CVS executable (i.e. will read the version [Concurrent Versions System (CVSNT) 2.0.62.1817 (client/server)]).
The .cvspass is not specified, because they apparently do not play nice with CVSNT (which prefers to keep passwords in the registry.) I've specified the password in the job config by using the :pserver:user:passg#server:/dir pattern for CVSROOT, which I found suggested in some places. Regardless of whether I run using that, or :pserver:userg#server:/dir as the CVSROOT I get the blinking red ball, jenkins stuck with a nearly full progress bar for 2 and a half minutes. It then fails. The console output yells with something like
FATAL: hudson.scm.ChangeLogSet.iterator()Ljava/util/Iterator;
java.lang.AbstractMethodError: hudson.scm.ChangeLogSet.iterator()Ljava/util/Iterator;
at hudson.model.AbstractBuild.getCulprits(AbstractBuild.java:282)
at hudson.model.AbstractBuild.getCulprits(AbstractBuild.java:279)
at hudson.model.AbstractBuild$AbstractRunner.post(AbstractBuild.java:596)
at hudson.model.Run.run(Run.java:1400)
at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:46)
at hudson.model.ResourceController.execute(ResourceController.java:88)
at hudson.model.Executor.run(Executor.java:175)
Both CVSROOTs I'm using provide no trouble with TortoiseSVN. I've found some mention of difficult of logging into SVN from jenkins as a service and related user/system issues, but considering I'm running it from the .war I don't think that's the issue.
EDIT:
Interestingly the console log if I use an invalid user or password recognizes such.
cvs [checkout aborted]: authorization failed: server rejected access to /dir for user FOO
FATAL: CVS failed. exit code=1
Finished: FAILURE
which indicates that Hudson is talking to the CVS server and authenticating, but something else goes wrong.
/EDIT
Cheers
Answer to the question found, thanks to rpetti on #jenkins on freenode. Problem was I had switched between Hudson and Jenkins and there were some incompatible configuration files that were mucking things up. Deleting and recreating the home directory solved the problem.
CVSNT 2.0.62.1817 is very very old and has several known security issues. Please upgrade to the latest 2.8.01.