   version: null
 
   constructor: (options) ->
-    {@resourcePath, @version} = options
+    {@resourcePath, @version, @devMode} = options
     global.atomApplication = this
 
     @pidsToOpenWindows = {}


  # Private: Handles an atom:// url.
  #
  # Currently only supports atom://session/<session-id> urls.
  #
  # * options
  #    + urlToOpen:
  #      The atom:// url to open.

  #      Boolean to control the opened window's dev mode.
  openUrl: ({urlToOpen, devMode}) ->
    parsedUrl = url.parse(urlToOpen)
    packageName = parsedUrl.host
    unless @packages?
      PackageManager = require './package-manager'
      fsUtils = require './fs-utils'
      @packages = new PackageManager({
        devMode: devMode
        configDirPath: fsUtils.absolute('~/.atom')
        resourcePath: @resourcePath
      })

    pack = _.find @packages.getAvailablePackageMetadata(), ({name}) -> name is packageName
    if pack?
      console.log(pack)
      if pack.urlMain
        packagePath = @packages.resolvePackagePath(packageName)
        bootstrapScript = path.resolve(packagePath, pack.urlMain)
        new AtomWindow({bootstrapScript, @resourcePath, devMode})
      else
        console.log "Package '#{pack.name}' does not have a url main: #{urlToOpen}"
    else
      console.log "Opening unknown url: #{urlToOpen}"

  # Private: Opens up a new {AtomWindow} to run specs within.
  #
