我很难在 Mac OS X 上使用Dart Editor 版本 0.5.0_r21823调试我的代码。
它以以下信息停止:
“Dart_InstanceGetClass 期望参数 'instance' 是 Instance 类型。”
我现在正在尝试穷人的调试器(即打印...),但即使那个也失败了。
_setupGui() {
// Bitmap background = new Bitmap(resourceManager.getBitmapData("Pigeon"));
print("Done loading resources");
ChessBoard b = new ChessBoard();
board = new ChessBoardView(b);
stage.addChild(board);
....
/**
* Holds a chess position.
*/
class ChessBoard {
static const String STARTPOS = "rnbqkbnr/pppppppp/8/8/8/8/PPPPPPPP/RNBQKBNR w KQkq - 0 1";
ChessBoard([String fen = STARTPOS]) {
print("ChessBoard($fen)"); // This gets written
_setFromFen(fen);
}
void _setFromFen(String fen) {
print("_setFromFEN($fen)"); // This is not written
...
控制台输出:
Fixed Canvas Style Size !!!!
Loading resources
Done loading resources
ChessBoard(rnbqkbnr/pppppppp/8/8/8/8/PPPPPPPP/RNBQKBNR w KQkq - 0 1)
... here it ends. I.e. setFromFEN() is not written ...