It's possible to debug to different applications at the same time?

In a few words here is my scenario:

  • Two different applications running as "micro services" however both are stored on the same server (let's call apps as A and B)
  • Two different projects which means two phpStorm IDE opened each one with a project 
  • Xdebug has been setup independently in both IDE and it works for each project

How it works:

  • App A depends on some calls made to app B trough an API

The problem:

  • I need to be able to debug app A, jump into B and continue debugging and then come back to A and still debugging

Is this possible? If so how?

0
4 comments

Yea, it's possible. You would need to setup correct path mappings. 

Here's an article to help you: https://confluence.jetbrains.com/display/PhpStorm/Simultaneous+debugging+sessions+with+PhpStorm

0

@Dmitry, somehow is not working for me. See the following pics (in this case I will rename A into ecase and B into api).

 

This is the setup for A (ecase):

This is the setup for B (api):

As I said before I will start debugging in A (ecase) and I should follow debugging on B (api) keeping the same debugging session, see the following sequence:

Because the previous code belongs to A then I choose ecase as the project to debug, then I went deeper (F7):

 

And from the `curl_exec` I should be jumping now into B which is API:

But for some reason is skipping that breakpoint on B and continue the execution on A. As per the config in Xdebug I have setup it to be like  xdebug.remote_autostart=1

Any ideas? What could be wrong here? What I am missing?

0

@Dmitry also I think that example you give me is not the best since both files are living on the same IDE and in my case there are two IDEs opened and files are completely independent. 

0
Avatar
Permanently deleted user

@Reynier It is not possible to pass sessions between different PhpStorm instances.

Why don't you open two projects in the same instance via File > Open Directory > Add to currently opened projects?

0

Please sign in to leave a comment.