小编phi*_*phi的帖子

如何在控制台或文件中获取os x应用程序的输出?

我正在编写一个嵌入Mono的Cocoa应用程序.我想运行并在终端中查看我的调试输出.在我正在使用的Cocoa方面NSLog(),在我正在使用的Mono方面Debug.Write().我可以在xcode的控制台中看到我的调试输出,但不能在终端中看到.这是我试过的:

$: open /path/build/Debug/MyProgram.app
$: open /path/build/Debug/MyProgram.app > output
$: open /path/build/Debug/MyProgram.app 2> output

在终端,但我没有在控制台或"输出"输出.

什么是正确的命令?

PS.我的最终目标是编写一个vim插件来管理,构建,运行,调试xcode项目.如果你能让这个vi输入管理器使用xcode,你可以省去这个麻烦.

debugging terminal xcode

41
推荐指数
3
解决办法
4万
查看次数

你能确定在我的 localhost:8000 上运行的是什么 Web 服务器吗?

Web 服务器不会立即启动;它在重新登录几分钟后启动。资源监视器显示“系统”正在侦听端口 8000。

我正在使用 Windows 7 专业版。我安装了XAMMPAptana,但它们已被删除。我确实安装了 Visual Studio 2010,但没有使用它进行任何 Web 开发。

本地主机上的 Web 服务器:8000

webserver windows-7

6
推荐指数
1
解决办法
8381
查看次数

如何使用gdb打印和使用常量(通过Xcode)?

我正在使用xcode-gdb调试Cocoa应用程序.我处于断点,我希望查看一些Cocoa常量(即NSControlKeyMask)的值,并使用当前堆栈帧中的值进行一些测试.具体来说,我在

- (void) keyDown:(NSEvent *) e 
,我已经完成了
set $mf = (int)[e modifierFlags]
在gdb提示符上.现在我想做
p $mf & NSControlKeyMask
并且gdb告诉我'当前上下文中没有符号"NSControlKeyMask".

更新:
Xcode具有" 修复并继续文本 "功能.所以我使用了Dan M.和n8gray解决方案,因此我不需要对每个常量进行代理.

debugging xcode cocoa gdb

5
推荐指数
1
解决办法
6310
查看次数

如何管理分布在多个文件夹中的SVN项目?

这是我的svn存储库的样子:

/
/libraries
  /libA
  /libB
  /libC
/tools
/projects
  /proj1
  /proj2
/website

我正在对libA和proj1进行更改.我想设置它,以便我可以在libA和proj1中一起提交我的更改.不检查整个存储库的挑战.我更喜欢解决方案是Tortoise SVN友好.

svn tortoisesvn

3
推荐指数
1
解决办法
1332
查看次数

如何在DrawingImage/DrawingContext中绘制无模糊/模糊线?

看图像.我希望中间线是一条1像素的香脆线.您可以将示例标记复制并粘贴到kaxaml中.

alt text http://img832.imageshack.us/img832/1704/lines.png


<Page xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
   <Image SnapsToDevicePixels="True" Stretch="None">
      <Image.Source>
         <DrawingImage>
            <DrawingImage.Drawing>
               <DrawingGroup>
                  <GeometryDrawing>
                     <GeometryDrawing.Pen>
                        <Pen Brush="Red" Thickness="1"/>
                     </GeometryDrawing.Pen>
                     <GeometryDrawing.Geometry>
                        <LineGeometry StartPoint="0,0" EndPoint="50,0"/>
                     </GeometryDrawing.Geometry>
                  </GeometryDrawing>
                  <GeometryDrawing>
                     <GeometryDrawing.Pen>
                        <Pen Brush="Black" Thickness="1"/>
                     </GeometryDrawing.Pen>
                     <GeometryDrawing.Geometry>
                        <LineGeometry StartPoint="0,5.860" EndPoint="50,5.860"/>
                     </GeometryDrawing.Geometry>
                  </GeometryDrawing>
                  <GeometryDrawing>
                     <GeometryDrawing.Pen>
                        <Pen Brush="Black" Thickness="1"/>
                     </GeometryDrawing.Pen>
                     <GeometryDrawing.Geometry>
                        <LineGeometry StartPoint="0,12" EndPoint="50,12"/>
                     </GeometryDrawing.Geometry>
                  </GeometryDrawing>
               </DrawingGroup>
            </DrawingImage.Drawing>
         </DrawingImage>
      </Image.Source>
   </Image>
</Page>
Run Code Online (Sandbox Code Playgroud)

wpf

3
推荐指数
1
解决办法
2764
查看次数

嵌入单声道时如何设置运行时选项?

像这些选项:

Usage is: mono [options] program [program-options]

Development:
    --aot                  Compiles the assembly to native code
    --debug[=]    Enable debugging support, use --help-debug for details
    --profile[=profiler]   Runs in profiling mode with the specified profiler module
    --trace[=EXPR]         Enable tracing, use --help-trace for details
    --help-devel           Shows more options available to developers

Runtime:
    --config FILE          Loads FILE as the Mono config
    --verbose, -v          Increases the verbosity level
    --help, -h             Show usage information
    --version, -V          Show version information
    --runtime=VERSION      Use the VERSION runtime, instead of autodetecting …

mono

2
推荐指数
1
解决办法
1111
查看次数

如何获取NSView的通知是隐藏的更改?

我正在构建一个Cocoa桌面应用程序.我想知道NSView的isHidden状态何时发生了变化.到目前为止使用目标/操作没有帮助,我在NSNotification中找不到任何有关此任务的内容.我想避免覆盖setHidden方法,因为那时我将必须覆盖我正在使用的所有NSView派生类.

更新:我最终使用KVO."isHidden"的路径是"隐藏"的,可能是因为setter是"setHidden".

cocoa

2
推荐指数
1
解决办法
2698
查看次数

如何让 ctags 获取 .h 文件中的函数?

我正在使用 Exuberant Ctags 5.7。我正在尝试使用以下命令为 CGContext.h 构建标签数据库:

标签 /System/Library/Frameworks/ApplicationServices.framework/Frameworks/CoreGraphics.framework/Headers/CGContext.h

生成的标签文件中不包含任何函数。它只有 75 行用于类型和枚举。

macos ctags

0
推荐指数
1
解决办法
854
查看次数

标签 统计

cocoa ×2

debugging ×2

xcode ×2

ctags ×1

gdb ×1

macos ×1

mono ×1

svn ×1

terminal ×1

tortoisesvn ×1

webserver ×1

windows-7 ×1

wpf ×1