XCode:如何退出lldb swift repl

我做了一个错字调试我的项目,并出现在lldb swift REPL中,现在我不知道如何退出它,同时也不会退出我调试的程序。 所以我输入了expr -r - myVariable而不是expr -R - myVariable。 以下是我所看到的。 (如果您想亲自尝试使用XCode 6.1,C ++代码项目,并且myVariable必须存在)

(lldb) expr -r -- record.mFileRecord.mVolumeName
(std::string) $19 = ""
1> help expr
/var/folders/zv/r3033x4n0f72bprvyk8612480000gn/T/lldb/30856
/repl433.swift:2:5: error: consecutive statements on a line must be 
separated by ';'

1> quit

/var/folders/zv/r3033x4n0f72bprvyk8612480000gn/T/lldb/30856
/repl434.swift:2:1: error: use of unresolved identifier 'quit'

quit


1> exit

/var/folders/zv/r3033x4n0f72bprvyk8612480000gn/T/lldb/30856/repl435.swift:2:1: error: use of unresolved identifier 'exit'

exit



1> exit()

/var/folders/zv/r3033x4n0f72bprvyk8612480000gn/T/lldb/30856/repl436.swift:2:1: error: use of unresolved identifier 'exit'

exit()

^


1> quit()

/var/folders/zv/r3033x4n0f72bprvyk8612480000gn/T/lldb/30856/repl437.swift:2:1: error: use of unresolved identifier 'quit'

quit()  


1> .quit

/var/folders/zv/r3033x4n0f72bprvyk8612480000gn/T/lldb/30856
/repl438.swift:2:2: error: could not find member 'quit'

.quit

^~~


1> :quit

(这里我的申请被终止了,lldb被自杀)


用一个冒号,你可以离开Swift REPL并返回lldb:

(lldb) repl
1> 
2> 
3> :
(lldb)

(在这里找到:http://swift.exomachina.com/how-to-use-lldb-to-debug-swift-program。)

使用:quit可以停止整个调试会话:

(lldb) repl
3> 
4> 
5> :quit
5> Program ended with exit code: 9
链接地址: http://www.djcxy.com/p/22591.html

上一篇: XCode: how to exit lldb swift repl

下一篇: How do I use vimdiff to resolve a conflict?