For me, I think from last Thursday or so, all breakpoints fail to hit for VisualStudio 2022 in a project for which I've used Devsense heavily for the past 6 months, on a new laptop (300+ tests, prior to that used VisualStudio 2019).
I tried a different pc, installed fresh Visual Studio 2022, same behavior. On that desktop pc, tried with VisualStudio 2019, no problem.
Installed 2019 to the laptop - breakpoints were fine. (I think this is proving we don't have some strange code or package installed)
Created a new test-only php project with one class, and in VS2022, breakpoints are not hit.
Here is the class:
<?php
/**
* Simplest - zero dependencies, trying to debug the issue of failing to stop at breakpoints.
*/
use PHPUnit\Framework\TestCase;
final class SimplestTest extends TestCase
{
/**
* @test
* @group Simplest
*/
public function test_DoNothing()
{
$this->markTestSkipped("do nothing");
}
/**
* @test
* @group Simplest
*/
public function test_DoSomething()
{
$one = 1;
$two = $one + $one;
$bret = $two > $one;
$this->assertTrue($bret, "two is greater than one");
}
}
here is phpunit.xml
<?xml version="1.0" encoding="UTF-8"?>
<phpunit bootstrap="vendor/autoload.php"
colors="true"
verbose="true"
stopOnFailure="false">
<testsuites>
<testsuite name="unit">
<directory>tests</directory>
</testsuite>
</testsuites>
</phpunit>
all the tests run in either "run" or "debug" mode, they just don't let you trace or hit breakpoints.