도움 요청이이 종류의 도움이되는지 확실하지 않은 경우 알려주십시오.누군가 내 앱을 디버깅하는 데 도움이 될 수 있습니까?
내일 전에 완료해야합니다. 완전히 완료되지 않았지만 지금은 다소 정상적으로 작동해야합니다. 이클립스 디버거 (매우 익숙하지 않은)를 사용하려고합니다.
오케이, 저는 디버깅 테스트였던 다른 프로젝트 폴더에 "디버깅"이라는 오래된 클래스가있었습니다. 나는 그 이름을주지 않았다. 그것은 임무였다. 그것은 몇 가지 문제를 일으키는 것으로 보였습니다, 그리고 그것을 제거하고 지금은 stacktrace 훨씬 작습니다.
보드 생성자를 디버깅 해보고 생성자에서 원래 코드를 메서드에 추가하고 해당 생성자에서 해당 메서드를 실행 해 보았습니다. 어떤 차이가 없지만 여전히.
이제 스택 트레이스는 다음과 같습니다
Thread [main] (Suspended)
Board(Object).<init>() line: 20
Board.<init>() line: 9
Game.<init>() line: 15
Game.main(String[]) line: 11
보드 생성자 :
공용 클래스 보드 {
private int COLUMNS = 8;
private int ROWS = 8;
private Square[][] grid;
public Board(){
addGrid();
}
public void addGrid(){
grid = new Square[COLUMNS][ROWS];
for(int row = 0; row < 8; row++){
for(int col = 0; col < 8; col++){
grid[col][row] = new Square(this);
}
}
}
광장 생성자 : m 중
public class Square {
private Piece piece;
private Board board;
public Square(Board b){
board = b;
}
Y 중단 점은 나는이 발견 :
ArrayIndexOutOfBoundsException: caught and uncaught
다시 시도를하고 이전과 비슷한 가지고 :
Thread [main] (Suspended)
ClassNotFoundException(Throwable).<init>(String, Throwable) line: 217
ClassNotFoundException(Exception).<init>(String, Throwable) line: not available
ClassNotFoundException.<init>(String) line: not available
URLClassLoader$1.run() line: not available
AccessController.doPrivileged(PrivilegedExceptionAction<T>, AccessControlContext) line: not available [native method]
Launcher$ExtClassLoader(URLClassLoader).findClass(String) line: not available
Launcher$ExtClassLoader.findClass(String) line: not available
Launcher$ExtClassLoader(ClassLoader).loadClass(String, boolean) line: not available
Launcher$AppClassLoader(ClassLoader).loadClass(String, boolean) line: not available
Launcher$AppClassLoader.loadClass(String, boolean) line: not available
Launcher$AppClassLoader(ClassLoader).loadClass(String) line: not available
Board.addGrid() line: 14
Board.<init>() line: 10
Game.<init>() line: 15
Game.main(String[]) line: 11
더 많은 코드가 있을까요? –
물론 이사회 수업의 첫 부분을 추가했습니다. 나는 보드 생성자의 첫 줄에서 중단 점부터 시작하려했다. 그것은 나에게 거의 같은 예외를 준다. –