function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Matt Davis 32Matt Davis 32 

"no debug log associated with test results"

With a test class in VS Code while connected to one of my sandboxes, I have run into an issue where I cannot run Debug Test or Debug All Tests with the Apex Replay Debugger. It gives me the error: "Debug failed to run" followed by another error, "No debug log associated with test results." In this sandbox it happens on all test classes I have tried since I first encountered the error, but no error in other sandboxes. I can do Run Test I cannot find anything on the web about this error message, and I can't think of anything I did specifically with this sandbox that might have caused it, except I recently refreshed it. Also, I connect from 2 different PCs, home and office, and same error, so it must be something with the sandbox. When I look in Setup>Debug Logs, under User Trace Flags, my user is listed there and the Start Date and Expiration Date fields are updated when I attempt to run Debug Test. Nothing shows up in the Debug Logs area below, and nothing shows up in the Logs tab in the Developer Console.

How do I give it what it wants?



Version: 1.77.0 (user setup)
Commit: 7f329fe6c66b0f86ae1574c2911b681ad5a45d63
Date: 2023-03-29T10:02:16.981Z
Electron: 19.1.11
Chromium: 102.0.5005.196
Node.js: 16.14.2
V8: 10.2.154.26-electron.0
OS: Windows_NT x64 10.0.19044
Sandboxed: No
 
VinayVinay (Salesforce Developers) 
Hi Matt,

You can try using LoggingLevel.ERROR in your debug statement.
System.debug(LoggingLevel.ERROR, **message**);
Also can you try running test methods from UI from Setup --> Develop --> Apex Test Execution.

Please mark as Best Answer if above information was helpful.

Thanks,