英文:
What's the error "noDebug mode: unable to process 'evaluate' request" means when I use visual studio code to run Go?
问题
当我运行代码并输入一些内容时,出现了一个错误。它显示“noDebug mode: unable to process 'evaluate' request”。我应该怎么解决这个问题?
package main
import "fmt"
func main() {
for {
fmt.Println("欢迎来到数学世界。输入1进行加法,输入2进行减法,输入3进行乘法,输入4进行除法")
choice := 0
fmt.Scanf("%d", &choice)
var a, b int
fmt.Scanf("%d %d", &a, &b)
switch choice {
case 1:
fmt.Println(add(a, b))
case 2:
fmt.Println(subtract(a, b))
case 3:
fmt.Println(multiply(a, b))
case 4:
fmt.Println(divide(a, b))
default:
fmt.Println("该选项不存在!")
}
}
}
func add(a, b int) int {
return a + b
}
func subtract(a, b int) int {
return a - b
}
func multiply(a, b int) int {
return a * b
}
func divide(a, b int) int {
return a / b
}
英文:
An error occured when I run the code and input something.
enter image description here
It says "noDebug mode: unable to process 'evaluate' request" .What should I do to solve this problem?
package main
import "fmt"
func main() {
for {
fmt.Println("Welcome to math world.Input 1 to an addiction,2 to a subtraction,3 to a multiplication,4 to a division")
choice := 0
fmt.Scanf("%d", &choice)
var a, b int
fmt.Scanf("%d %d", &a, &b)
switch choice {
case 1:
fmt.Println(add(a, b))
case 2:
fmt.Println(subtract(a, b))
case 3:
fmt.Println(multiply(a, b))
case 4:
fmt.Println(divide(a, b))
default:
fmt.Println("The order is not exist!")
}
}
}
func add(a, b int) int {
return a + b
}
func subtract(a, b int) int {
return a - b
}
func multiply(a, b int) int {
return a * b
}
func divide(a, b int) int {
return a / b
}
答案1
得分: 1
请参考这个提出的Github问题。据说这可能与VS Code有关。
英文:
Please refer to this Github issue raised. This may be related to VS Code too as stated.
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论