Xcode Swift终端应用程序 - 无法调试

时间:2017-02-04 00:48:18

标签: xcode macos swift3 xcode8

Swift 3.0.2,Xcode版本8.2.1(8C1002)

项目是使用Swift Package Manager swift package init

创建的
import PackageDescription

let package = Package(
    name: "Collection",
    dependencies: [
      .Package(url: "https://github.com/czechboy0/Jay.git", majorVersion: 1),
      .Package(url: "https://github.com/Zewo/HTTPClient.git", majorVersion: 0, minor: 14),
      .Package(url: "https://github.com/IBM-Swift/HeliumLogger.git", majorVersion: 1)
    ]
)

这是一个终端OS X / Linux应用程序

✗ find Sources
Sources
Sources/Collection
Sources/Collection/.DS_Store
...
Sources/Collection/main.swift
...

Xcode项目是使用swift package generate-xcodeproj

创建的

无论是在Xcode还是后续版本中首次启动项目,设置断点都有效,但调试支持支持完全没用。

  • 不显示监视符号。
  • po / p说明不起作用

Xcode嵌入式调试终端在项目断点上显示:

warning: Swift error in module Collection.
Debug info from this module will be unavailable in the debugger.

warning: Swift error in module POSIX.
Debug info from this module will be unavailable in the debugger.

warning: Swift error in module Axis.
Debug info from this module will be unavailable in the debugger.

warning: Swift error in module Venice.
Debug info from this module will be unavailable in the debugger.

warning: Swift error in module HTTP.
Debug info from this module will be unavailable in the debugger.

warning: Swift error in module File.
Debug info from this module will be unavailable in the debugger.

warning: Swift error in module HTTPFile.
Debug info from this module will be unavailable in the debugger.

warning: Swift error in module IP.
Debug info from this module will be unavailable in the debugger.

warning: Swift error in module OpenSSL.
Debug info from this module will be unavailable in the debugger.

warning: Swift error in module TCP.
Debug info from this module will be unavailable in the debugger.

warning: Swift error in module HTTPClient.
Debug info from this module will be unavailable in the debugger.

Shared Swift state for Collection has developed fatal errors and is being discarded.
REPL definitions and persistent names/types will be lost.

1 个答案:

答案 0 :(得分:1)

试试这个:

  • open terminal
  • 输入sudo xcode-select -r

xcode-select -r重置路径: /Applications/Xcode.app/Contents/Developer

旧的是: /Library/Developer/CommandLineTools