Got remote debugging working in PHPStorm (version 6.0.2.) and every time execution stops on a breakpoint it shows me the current variables etc.
But it does not actually show me the file and line where the debugging has halted. I would expect the editor to jump to the file and highlight the line with the breakpoint that has just been reached. Can this be set by config somewhere, or it is like this by design?
I've found the answer. PHPStorm needs to be able to match the code repository file locations with those in the web root. Therefore we need to map them in the server settings of PHPStorm.
I have been using a Quickstart virtual machine (https://drupal.org/project/quickstart) on a Windows PC. The repository is located on the PC but shared with the virtual machine.
So it was debugging as I said but it kept saying "Remote file path ‘path/to/script/on/server.php’ is not mapped to any file path in project". I figured the problem of focussing on the currently debugged file and line might be related to mapping.
In the server settings of PHPStorm I mapped the Windows root of the repository directory to the Linux web path in the virtual server (in my case /home/quickstart/websites/mysite.local) and that was apparently what confused the debugger... when I later used the mount path in Linux, thus the path to the shared location which is actually on the PC (in my case /mnt/vbox-shared/mysite.local), it and from that moment the file and line started to focus!
If debugger successfully stopped at breakpoint, IDE should focus that file and line -- it works like that here (unless I completely misunderstood you).
In any case: Run | Show Execution Point Alt+F10 is always available (also available on debug toolbar).
Related
Sorry if this is a duplicate -- I've looked at this and this and others, but I can't find my problem.
A program I build debugs successfully on my local machine, but when I try to debug it remotely, I can't set breakpoints in my code. I've opened the modules window in the debugger, and under Symbol Status for my executable, it tells me "Cannot find or open the PDB file." I try to load it manually, and get the error, "A matching symbol file was not found in this folder."
I created a minimal (hello world) app, and I can debug that, so I'm able to reach the remote PC. Indeed, the app does start up and run on the remote system. So, it isn't an access issue.
Not sure what else to say about this, other than to show you my project debugging configuration:
Any ideas are MOST welcome. Thanks...
Well, I found the answer -- I needed to check the "deploy" box in the Configuration Manager window. This surprised me a little, as using the "deploy" command (available from right-clicking the project property) didn't do the trick. Evidently, there's some behind-the-scenes magic that takes place when the deploy box is checked.
I have one automation project which does the job of building the setup using NSIS wrapper. The project is built with the VB6 code. During the execution of the project I am getting the error for deleting a file as “Method 'DeleteFile' of object 'IFileSystem3' failed” for the method ‘FileSystemObject.DeleteFile’ with force option set to true.
Scenario:
Server (Windows server 2012) drive is mapped to the local windows 7 system and whole operation is run in this mapped drive in client machine. And the project is run on the client machine.
Now when I run my project to build the setup, it copies all the application files to a folder called Temp under build1 and build2 directory and then it builds 2 separate setup exe using the NSIS (makeNSIS). After the creation of NSIS setups, it will delete all the source files from temp folder. While deleting the MDAC_TYP.exe file, I get the error as mentioned above. The above said error comes for both the Build1 & Build2 folders and the error comes occasionally (not every time) for the same exe.
I cannot rename/delete/move the file in any of the PC through UNC or even in server it cannot be deleted. If I try to rename/delete the file or its parent folder, the system from where I try to delete/rename gets stuck.
Other methods I tried are as below.
Tried my project under testing environment and there was no such error.
Checked for file handle using process explorer in both client as well as server – No handles were found
Checked for Open files in the Shared folders of the server. - No open file connection found for the file.
Tried rebooting the client machine – Not solved.
Tried to delete/Rename the file using command in server – Not possible.
Tried to delete/rename the file in server – No error and no message. Instead, server gets stuck.
Checked for disk problems using chkdisk in server. No problems reported.
Folder permission – The user ha full permission and there is no issue.
Tried running the same build process after reboot – Everything works fine. But, again repeats after some time/day.
Tried disconnecting the mapped drive at the time of error exists. But, still not able to rename.
No antivirus/Event viewer log in both client as well as server
After all these still I could not able to explain why exactly the error occurring.
Update:
I recently noticed that the same error also occurs when deleting the file msstdfmt.dll
Update 2:
I also got error for the ms word file, error is same. In all the 3 cases i found that there is only a common thing that is all 3 files has read-only attribute.
I'm attempting to sync my local PHPStorm project from my Windows 7 PC with my Ubuntu server.
When I try any kind of connection (e.g. "Test SFTP connection"), it fails with
Invalid descendent file name "C:\nppdf32Log\debuglog.txt"
the folder mentioned doesn't exist on my Windows machine, and of course not on my Ubuntu server.
Even the most basic operation connecting to the Ubuntu server is failing because of this - Jetbrains support suggested asking here, so does anyone have a clue?
You have a file on your Ubuntu server with that C:\nppdf32Log\debuglog.txt name. YES -- it's on Ubuntu and YES -- it's actually a file name and not full path (Linux allows : and \ characters in file names).
Unfortunately such file name is invalid on Windows and library used for SFTP communications in PhpStorm does not allow to process such files in any way (yes, it's valid as full path but not as file name alone).
The solution is to connect to your SFTP using another program (e.g. FileZilla) and delete that file. After that you will be able to continue with PhpStorm built-in SFTP functionality.
P.S.
Such file is usually created by Firefox on Linux (google that file name for additional details).
https://askubuntu.com/questions/144408/what-is-the-file-c-nppdf32log-debuglog-txt
Jetbrains support suggested asking here
That's odd (and hard to believe for me) -- they should know about such issue for sure -- you are not first who is facing the same error.
In any case -- this is the ticket to watch after -- hopefully the used library (for SFTP communications) will allow handling such situations better in the future.
http://youtrack.jetbrains.com/issue/WI-2449
I met with the same problem,
but I included logging of errors (description here https://devnet.jetbrains.com/docs/DOC-1202)
and I saw that I had created a file with incorrect name
I had this same problem, but it was not due to Firefox and I wonder if the original asker might have made the same mistake I did in configuring his xdebug.
As a newbie, in setting the value for xdebug.remote_log in my php.ini (actually in separate xdebug.ini), I used the windows file path to my project on my local machine. Why? Because the value called "remote_log", so I mistakenly thought it wanted the path on my windows machine, which I thought was very strange at the time. But I am new to remote debugging, so... Oops.
Using windows path is wrong:
xdebug.remote_log="C:\Users\Buttle\PhpstormProjects\xdebug_log.txt"
And it results in:
/var/www/myproject/C:\Users\Buttle\PhpstormProjects\xdebug_log.txt
(the bolded part is the actual file name)
This is right:
xdebug.remote_log="xdebug_log.txt"
And presumably results in:
/var/www/myproject/xdebug_log.txt
(the bolded part is the actual file name)
It appears that Xdebug saves that log file inside of the folder where the requested php file came from (in my case, my project's index.php file).
I imagine that if I enter an valid linux path, I might be able to put the file somewhere else. E.g.
This might work:
xdebug.remote_log="/var/www/xdebug_log.txt"
So this solves 2 problems: 1.) why the heck doesn't xdebug log anything on its server (it does!) 2.) descendant file problem.
I got Team Explorer Everywhere so we can use TFS on the Mac Mini we got to test Iphone apps. Since we're using XCode for phonegap, we need to use the commandline program and it is giving me a lot of grief.
What I've done so far (Listing out for anyone who stumbles on this so they can use it):
-Downloaded the trial (free)
-Set the path using PATH=$PATH\:/FOLDERLOCATION
-Accepted EULA and got trial product key... for command line program (tf eula/tf productkey -trial)
-Set up workspace:
tf workspace -new WORKSPACENAME -server:http://SERVERNAME:PORT/FILEPATH -comment:"WORKSPACENAME" && prompted for username -> domain -> password
-Trying to setup the folder path (Fixed):
tf workfold -map SERVERFOLDERPATH LOCALFOLDERPATH -collection:http://SERVERNAME:PORT/FILEPATH -workspace:WORKSPACENAME && prompted for username -> domain -> password
-Make sure I can check out/check in (On hold):...
The error I'm getting right now is "An argument error occurred: First free argument must be a server path." This is what I've been following ever since I got the path set, but I think the versions are different because mine doesn't seem to be set up the same. Any help at all would be appreciated, and I'll keep up with the post as I figure parts out because there doesn't seem to be much online that I can find on TFS on macs.
Update: As normal, I'm an idiot. Have to put the options at the end of the command and have to have the serverfolder path as the first thing after -map. Now I just need to figure out how to use the damn thing. I'll post any other questions I have and try to get all the correct commands up for the selfish reason of having them somewhere in case I forget them later.
Update 2: The mapping hasn't worked out as well as I'd hoped, it seems a combination of my unfamiliarity with Unix/Mac file systems and some settings being missing is keeping me from using 'tf get' to load all of the test data I was trying to get. I'm planning on trying again after I get the location of where my boss wants the data saved and after I can look into something that would save the workspace so it won't say that it can't find the map path every time...
It looks like you're setting up your workspace and some working folder mappings just fine, after the edit. If you're having problems doing a tf get after this, then there are some common problems that might be occurring. TFS workspaces can be a little bit opaque and having a better understanding of them can sometimes help you understand where the problem is:
Team Foundation Server requires a workspace to be configured before you can get files out of source control, edit them or check them back in. A workspace basically simply contains working folder mappings that map your local path(s) to server path(s).
Workspaces are stored on the server and are uniquely identified by your computer's hostname, your username and the workspace's name. A cache of this information for the local host is saved on the client. This implies:
If you remove a workspace on the server, your workstation will be unable to connect.
If you remove the cache, your local computer will not be able to identify the workspace based on working folder mappings until the cache is rebuilt (which happens every time you connect to the server.)
If you change your username or local workstation's name, you cannot access those workspaces.
(Note that very early versions of the Teamprise command line client had certain issues on Mac OS that made identifying the local workstation name difficult. This is fixed, however, in Team Explorer Everywhere.)
Because you can have multiple workspaces for a single server on a single workstation, you can't always simply provide server paths to tf commands, since server paths are ambiguous. ($/ exists in every workspace, for example.) So the command line client resolves paths based on the current working directory and/or the arguments provided. Meaning that you can run tf get foo.txt if you're in a working folder, or you can run tf get /tmp/foo.txt if /tmp is mapped.
One more point - the configuration data for Team Explorer Everywhere is shared between the TFS plug-in for Eclipse and the command line client. So if you're more comfortable using a GUI to set up your workspace(s), you can do that and then use the CLC as you see fit. You don't need to be a Java programmer to use Eclipse - simply download Eclipse and install the TFS plug-in for Eclipse into it, and select Window > Open Perspective > Team Foundation Server Exploring. After that, you'll have the full GUI Team Explorer experience and this perspective will be restored when you open Eclipse, so you won't even need to worry about the Java IDE bits if you don't want to.
We develop software, which constantly needs to be debugged on both Linux and Windows. The way I would like to do this is to have an option in Eclipse (PyDev) saying "Debug this application on the remote Linux server". I then want the option to execute the code line-by-line.
Does such a feature exist in Eclipse? If it does not exist in Eclipse, what is the recommended approach to do such a thing? I have thought about installing Eclipse also on the Linux server, but then I have the extra work of configuring and maintaining several eclipse setups.
Have you read: http://pydev.org/manual_adv_remote_debugger.html ?
One thing you cannot escape from right now is having the sources for the debugger in the platform you want to run... (although you don't need eclipse itself there, at least you need the contents of org.python.pydev.debug/pysrc there, so, maybe you can create your script which will copy those from a 'central' location you keep updated, or if you have a shared folder, just add that network folder to your pythonpath).