Maxim Veksler
Maxim Veksler

Reputation: 30192

Xcode Swift terminal application - Unable to debug

Swift 3.0.2, Xcode Version 8.2.1 (8C1002)

Project was created using 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)
    ]
)

This is a terminal OS X / Linux application

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

Xcode project was created with swift package generate-xcodeproj

Regardless of if it's a first launch of the project in Xcode or subsequent builds, setting a breakpoint works but renders the debugging support support completely useless.

Xcode embedded debugging terminal shows this on project breakpoint:

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.

Upvotes: 2

Views: 4638

Answers (1)

cento
cento

Reputation: 36

Try this:

  • open terminal
  • type sudo xcode-select -r

xcode-select -r resets the path to: /Applications/Xcode.app/Contents/Developer

The old one was: /Library/Developer/CommandLineTools

Upvotes: 2

Related Questions