`package com.demo.test.helloworld;
import java.util.Scanner;
import org.springframework.boot.CommandLineRunner;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
@SpringBootApplication
public class DemoApplication implements CommandLineRunner {
public static void main(String[] args) {
SpringApplication.run(DemoApplication.class, args);
}
@Override
public void run(String... args) throws Exception {
System.out.println("Please enter name");
Scanner scanner = new Scanner(System.in);
String name = scanner.nextLine();
System.out.println("Hello: " + name);
scanner.close();
}
}`
{ // Use IntelliSense to learn about possible attributes. // Hover to view descriptions of existing attributes. // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387 "version": "0.2.0", "configurations": [ { "type": "java", "name": "Debug (Launch)-DemoApplication<helloworld>", "request": "launch", "cwd": "${workspaceFolder}", "console": "internalConsole", "stopOnEntry": false, "mainClass": "com.demo.test.helloworld.DemoApplication", "projectName": "helloworld", "args": "" }, { "type": "java", "name": "Debug (Attach)", "request": "attach", "hostName": "localhost", "port": 0 } ] }
vscode: 1.21.1
When run from maven custom goal: spring-boot:run it runs fine. When run via F5 debug it fails after input. "Failed to evaluate. Reason: Cannot evaluate because the thread is resumed." There are no breakpoints placed anywhere in the code.
https://stackoverflow.com/questions/48642367/visual-studio-code-failed-to-evaluate-reason-cannot-evaluate-because-the-thre
`package com.demo.test.helloworld;
import java.util.Scanner;
import org.springframework.boot.CommandLineRunner;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
@SpringBootApplication
public class DemoApplication implements CommandLineRunner {
}`
{ // Use IntelliSense to learn about possible attributes. // Hover to view descriptions of existing attributes. // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387 "version": "0.2.0", "configurations": [ { "type": "java", "name": "Debug (Launch)-DemoApplication<helloworld>", "request": "launch", "cwd": "${workspaceFolder}", "console": "internalConsole", "stopOnEntry": false, "mainClass": "com.demo.test.helloworld.DemoApplication", "projectName": "helloworld", "args": "" }, { "type": "java", "name": "Debug (Attach)", "request": "attach", "hostName": "localhost", "port": 0 } ] }vscode: 1.21.1
When run from maven custom goal: spring-boot:run it runs fine. When run via F5 debug it fails after input. "Failed to evaluate. Reason: Cannot evaluate because the thread is resumed." There are no breakpoints placed anywhere in the code.
https://stackoverflow.com/questions/48642367/visual-studio-code-failed-to-evaluate-reason-cannot-evaluate-because-the-thre