Отладчик Java не работает в коде Visual StudioJAVA

Программисты JAVA общаются здесь
Ответить
Anonymous
 Отладчик Java не работает в коде Visual Studio

Сообщение Anonymous »

I have installed the debugger extension
and I created launch.json file and I added breakpoint in the main function but when I click on run nothing happens and when I click on debug
it keeps loading without response I tried to reinstall the extension
and restart vscode but the issue still happens
this is the class where i added breakpoint :

Код: Выделить всё

import java.util.*;

public class CaeserCipher {
int key;
String message;

public CaeserCipher(String plaintext, int secret) {
message = plaintext;
key = secret;
}

private String preprocess(String text) {
return (text.toLowerCase()).replaceAll("\\s+", "");
}

protected String encrypt() {
message = preprocess(message);
int n = message.length();
String cipherText = "";
for (int i = 0; i < n; i++) {
char temp = message.charAt(i);
temp += key;
if (temp > 'z')
temp -= 26;
cipherText += temp + "";
}
return cipherText;
}

public static void main(String args[]) {
CaeserCipherDemo test = new CaeserCipherDemo();
test.run();
}
}
Это скриншот от vscode, когда я запускаю отладку:


Подробнее здесь: https://stackoverflow.com/questions/662 ... tudio-code
Ответить

Быстрый ответ

Изменение регистра текста: 
Смайлики
:) :( :oops: :roll: :wink: :muza: :clever: :sorry: :angel: :read: *x)
Ещё смайлики…
   
К этому ответу прикреплено по крайней мере одно вложение.

Если вы не хотите добавлять вложения, оставьте поля пустыми.

Максимально разрешённый размер вложения: 15 МБ.

Вернуться в «JAVA»