Breakpoint getting hit in wrong file...
2 posts
• Page 1 of 1
Breakpoint getting hit in wrong file...
Hey guys,
I found an issue, where when you have two or more projects in the one solution that have the same class, in the same namespace, and you set a breakpoint in the second project's class, it actually breaks into class in the first project instead, even when there is no breakpoint in the first project.
I have attached a sample solution that contains two projects, each project has two files: index.php and TestClass.php.
The TestClass is in a namespace and has a single static method.
The index.php has a single line of code that calls a static method in TestClass class.
index.php
TestClass.php
Steps to replicate the issue:
1) Put a break point in PHPWebProject2\Classes\Vendor\TestClass.php on the line:
in the test function.
2) Ensure there is no break points in PHPWebProject1
3) Right Click on PHPWebProject2 and select Debug\Start New Instance from the context menu.
You will see that the debugger breaks into PHPWebProject1, instead of PHPWebProject2.
Regards,
Scott
I found an issue, where when you have two or more projects in the one solution that have the same class, in the same namespace, and you set a breakpoint in the second project's class, it actually breaks into class in the first project instead, even when there is no breakpoint in the first project.
I have attached a sample solution that contains two projects, each project has two files: index.php and TestClass.php.
The TestClass is in a namespace and has a single static method.
The index.php has a single line of code that calls a static method in TestClass class.
index.php
- Code: Select all
<?php
include('Classes\Vendor\TestClass.php');
echo Vendor\TestClass::test();
?>
TestClass.php
- Code: Select all
<?php
namespace Vendor;
class TestClass
{
public static function test() {
return "PHPWebProject2 - Hello World!";
}
}
?>
Steps to replicate the issue:
1) Put a break point in PHPWebProject2\Classes\Vendor\TestClass.php on the line:
- Code: Select all
return "PHPWebProject2 - Hello World!";
in the test function.
2) Ensure there is no break points in PHPWebProject1
3) Right Click on PHPWebProject2 and select Debug\Start New Instance from the context menu.
You will see that the debugger breaks into PHPWebProject1, instead of PHPWebProject2.
Regards,
Scott
You do not have the required permissions to view the files attached to this post.
Last edited by codeowl on March 26th, 2013, 11:48 pm, edited 1 time in total.
- codeowl
- Posts: 51
- Joined: February 10th, 2013, 10:05 am
Re: Breakpoint getting hit in wrong file...
Hi Scott,
Thanks for reporting this and creating the test case! I was able to replicate it, it will be fixed.
Regards,
Miloslav
Thanks for reporting this and creating the test case! I was able to replicate it, it will be fixed.
Regards,
Miloslav
Miloslav Beno │ DEVSENSE s.r.o. │ @miloslavbeno │ miloslav@devsense.com
-
Miloslav Beno - Posts: 1252
- Joined: January 7th, 2012, 8:36 pm
2 posts
• Page 1 of 1
Who is online
Users browsing this forum: No registered users and 35 guests