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();
}
}
Подробнее здесь: https://stackoverflow.com/questions/662 ... tudio-code
Мобильная версия