安装不成功化解进度记录

简介

SourceTree
是一款有所可视化界面的花色版本控制软件,适用于git项目管理,同时它集成了
git flow 工作流程,对于素不相识 git 命令的初学者的话,可以经过 SourceTree
火速学会运用 Git 和 git flow 来涉足代码版本管理和团队合作开发。

重点讲了3局地故事情节:

      mac
lion下自带的Apache,增加很少,其余我自个儿尝尝用php源码编译未通过,因为决定用1个集成的mamp,这就是xampp(一定要安装那么些xampp开发包,不然编译php增添的时候会出错)。在windows和Linux
下安装一些主次依旧php的扩大资料很多,而关于mac最新版10.7.4的材质极少。顺便提下mac的好用的装置工具,二个是MacPort,一个是Homebrew.macport或者被墙,安装时恐怕会卡住。

Using the Visual Studio .NET 2003 Debugger with ASP.NET Applications

问题

后天在崭新的一台 win10 电脑上设置 SourceTree (2.3.1.0)
时没有安装成功,也不曾其他不当提醒,双击安装文件后,出下下图后,并未成功安装。

澳门葡京备用网址 1

  1. 如何在Linux下安装Git
  2. 配置Git
  3. 赢得帮衬

  4. Installing Git

     上边进入正题,例如先天先安装redis和php-redis。关于redis for
mac的材质在 ,顺便说下让redis开机自动运营的设置: 说的很了解。我照旧引用过来作为参照,注意本人加粗加红的地点。

 

解决

经过 谷歌(Google) 后在 Stack Overflow 上发现这么些题材: Source Tree doesn’t
launch after
installation

Cause

The most likely reason for this error is that the user.config file for
SourceTree has been corrupted. You can confirm this by locating the
file in this location:
C:Users<User>AppDataLocalAtlassianSourceTree.exe_<random_string><version_number>

If this is the cause, when you open the file, it will be full of
<NULL> values.

Resolution

If the user.config file is indeed corrupted, you may delete it. It
will be regenerated the next time you start SourceTree, and the
application should start normally.

看起来消除办法就是删除 C:\Users\<User>\AppData\Local\Atlassian\SourceTree.exe_<random_string>\<version_number> 下的user.config 后重新安装

根据上述方法尝试后发现依旧无效,所以唯有别的想艺术。

协调做过四年的 .NET 开发,跑到了C:\Users\<User>\AppData\Local\Atlassian\SourceTree 目录下看了 sourcetree.log 日志新闻:

ERROR [2018-03-17 20:27:06,785] [3] [SourceTree.App] [.ctor] - finish EnsureSquirrelExecutionStubIsCopied
ERROR [2018-03-17 20:27:07,491] [4] [SourceTree.App] [OnStartup] - Failed to start
System.NullReferenceException: 未将对象引用设置到对象的实例。
   在 SourceTree.Notifications.NotificationsManager.SetOwner(NotificationDialogWindow notificationWindow)
   在 SourceTree.Notifications.NotificationsManager.ShowNotificationDialog[T](NotificationDialogWindow notificationWindow, Tuple`2 customAction, VistaTaskDialogIcon icon)
   在 SourceTree.Notifications.NotificationsManager.ShowNotificationDialog[T](String title, String message, Tuple`2 customAction, String cancelLabel, String suppressionSetting, Action`1 suppressionChangedAction, Object contentControl, String contentCommandLabel, Action contentAction)
   在 SourceTree.Notifications.NotificationsManager.ShowNotificationDialogWithYesConfirmation(String title, String message, String details)
   在 SourceTree.Configuration.WpfSpellCheckerPreFlightCheck.Run()
   在 SourceTree.AppRoot.RunPreFlightChecks()
   在 SourceTree.AppRoot.OnStartup(StartupEventArgs e)
   在 SourceTree.App.OnStartup(StartupEventArgs e)

哈哈,发现了  style=”color: #ff0000; background-color: #fbe3e7″>Wpf 的人影,本人还在
10 年左右用 WPF 开发过使用,很亲密的感觉到。

既然是微软系技术做的工具,肯定是亟需 .NET Framework
辅助的,因而跑去微软官网 https://www.microsoft.com/net… 重新安装最新的
.net framework.

下一场重新安装 SourceTree 就復苏不荒谬了。


 

Min Kwan Park
Visual C# Debugger QA Team
Microsoft Corporation

1.1 Installing on Linux

If you’re on Fedora for example, you can use yum:

$ sudo yum install git-all

If you’re on a Debian-based distribution like Ubuntu, try apt-get:

$ sudo apt-get install git-all

If you’re developing on the mac using redis and want it to start
automatically on boot, you’ll want to leverage the
OSX launchd system to run it as a User Daemon. A User Daemon is a
non-gui program that runs in the background as part of the system. It
isn’t associated with your user account. If you only want redis to
launch when a particular user logs in, you’ll want to make a User
Agent instead.

From the command line, create a plist file as root in
the /Library/LaunchDaemons directory with your favorite text editor:

sudo vim /Library/LaunchDaemons/io.redis.redis-server.plist

Paste in the following contents and modify it to point it to wherever
you’ve got redis-server installed and optionally pass the location
of a config file to it (delete the redis.conf line if you’re not
using one
):

<?xml version="1.0" encoding="UTF-8"?>  <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">  <plist version="1.0">  <dict>   <key>Label</key>   <string>io.redis.redis-server</string>   <key>ProgramArguments</key>   <array>    <string>/usr/local/bin/redis-server</string>    <string>/usr/local/etc/redis.conf</string>   </array>   <key>RunAtLoad</key>   <true/>  </dict>  </plist>

安装不成功化解进度记录。Make sure that you actually have a redis.conf file at the location
above. If you’ve installed it withhomebrew that should be the correct
location.

You’ll then need to load the file (one time) into launchd
with launchctl:

sudo launchctl load /Library/LaunchDaemons/io.redis.redis-server.plist

Redis will now automatically be started after every boot. You can
manually start it without rebooting with:

sudo launchctl start io.redis.redis-server

You can also shut down the server with

sudo launchctl stop io.redis.redis-server

Or you could add these aliases to your bash/zsh rc file:

alias redisstart='sudo launchctl start io.redis.redis-server'  alias redisstop='sudo launchctl stop io.redis.redis-server'

If you’re having some sort of error (or just want to watch the logs),
you can just fire up Console.app to watch the redis logs to see
what’s going on.

April 2005

2. First-Time Git Setup

Git comes with a tool called git config that lets you get and set
configuration variables that control all aspects of how Git looks and
operates. These variablescan be stored in three different places:

  1. /etc/gitconfig file: Contains values for every user on the system
    andall their repositories. If you pass the option –system to git
    config, itreads and writes from this file specifically.
  1. ~/.gitconfig or ~/.config/git/config file: Specific to your user.
    You can make Git read and write to this file specifically by passing
    the –global option.
  2. config file in the Git directory (that is, .git/config) of whatever
    repository you’re currently using: Specific to that single
    repository.Each level overrides values in the previous level, so
    values in .git/config trump those in /etc/gitconfig.

说了那样多,还没有起来设置php-redis.上面先河:

Summary: Debugging ASP.NET can be difficult because the
configuration and interplay of accounts can cause breaks at a number of
different steps. This article outlines the more commonly seen problems
associated with debugging ASP.NET applications, shows examples of the
errors, and explains how to fix them. (14 printed pages)

2.1 Your Identity

The first thing you should do when you install Git is to set your user
name andemail address. This is important because every Git commit uses
this information,and it’s immutably baked into the commits you start
creating:

$ git config –global user.name “John Doe”
$ git config –global
user.email
johndoe@example.com

首先用git从

Contents

Introduction
ASP.NET
Debugging
General
Debugging
Causality Debugging: Stepping Between Web Service Client and Web
Service
Remote
Debugging

2.2 Checking Your Settings

$ git config –list
user.name=John Doe
user.email=johndoe@example.com
color.status=auto
color.branch=auto
color.interactive=auto
color.diff=auto …

You can also check what Git thinks a specific key’s value is by typing
git config <key>:

$ git config user.name John Doe

sudo /Applications/XAMPP/xamppfiles/bin/phpize

sudo MACOSX_DEPLOYMENT_TARGET=10.7 CFLAGS="-arch i386 -arch x86_64 -g -Os -pipe -no-cpp-precomp" CCFLAGS="-arch i386 -arch x86_64 -g -Os -pipe" CXXFLAGS="-arch i386 -arch x86_64 -g -Os -pipe" LDFLAGS="-arch i386 -arch x86_64 -bind_at_load" ./configure --enable-redis --with-php-config=/Applications/XAMPP/xamppfiles/bin/php-config

sudo make && sudo make install

Introduction

During the last several months, I have worked with many users, both
internal and external to Microsoft, who have had debugging issues. I
noticed there are many common mistakes and problems that can be solved
if users are provided with a proper diagnosis. Hence, I’ve written this
document to provide you with the information that will help you resolve
your issues while using the debugger.

This document contains:

  • Error message dialog or description of the error situation.
  • The causes for said error.
  • Resolution for said problem.

I would like to thank the VCS debugger team and other people who helped
me write this article and provided me with excellent feedback.

3. Getting Help

If you ever need help while using Git, there are three ways to get the
manual page (manpage) help for any of the Git commands:

$ git help <verb>
$ git <verb> –help
$ man git-<verb>

下一场修改php.ini(扩展:extension=redis.so),重启xampp服务就能够了。

ASP.NET Debugging

Note   If you can’t find the error message that you’re looking for
in this section, please check the section that deals with general
debugging issues or remote debugging issues.

 

Message: Unable to start debugging on the Web server

澳门葡京备用网址 2

Figure 1. Unable to start debugging error message

Cause 1: Your IIS application is not configured to use Integrated
Windows Authentication
. Make sure that the Integrated Windows
Authentication
checkbox on the Authentication Method dialog box is
checked, as shown in Figure 2.

澳门葡京备用网址 3

Figure 2. Enabling Integrated Authentication

Cause 2: Check the Enable HTTP Keep Alive澳门葡京备用网址 , option of IIS. If it
is turned off, you may need to turn it on and try your debugging again.

示范代码

Message: You do not have permission to debug the server

澳门葡京备用网址 4

Figure 3. No Permissions to Debug

Cause 1: Make sure that Integrated Windows Authentication is
enabled. The likely cause is that only Basic authentication for
Directory security of IIS is enabled.

Cause 2: If you are using Integrated Windows Authentication, you
need to make sure that your user account has full control on the
directory of the IIS.

Cause 3: If you created the Web project with a full machine name
(like machinename.domainname.something), the Web site is recognized as
Internet site. So, the default setting of Internet Explorer will impact
on the behavior of logging on. In this case, you need to enable logging
on with your current user account in “Internet” area with the IE
setting.

However, this is not the default setting of Internet Explorer, so you’re
better off creating a project with only the machine name and using
Figure 4 as a guide for your Security Settings.

澳门葡京备用网址 5

Figure 4. Setting Internet Explorer Authentication

 

Message: Server side-error occurred on sending debug HTTP request.

澳门葡京备用网址 6

Figure 5. Server-side Error During Debugging

Cause 1: Your Web application doesn’t have an Application name. To
remedy this situation, check the properties of the Web project using the
IIS MMC to ensure that your Web project has an application name. Your
application name should appear where the red outline appears in Figure
6.

澳门葡京备用网址 7

Figure 6. Setting Application Name

Cause 2: If you are using the NTFS file format, make sure that
“aspnet” has proper privilege on “wwwroot” or your folder for virtual
directory to access and write on the folders.

<?php

Message: The project is not configured to be debugged.

澳门葡京备用网址 8

Figure 7. Project not configured for debugging

For this error message, you need to make sure that your Web is
configured for debugging. To do this, you need set debug = true in the
web.config file. You can find this file in your Web project folder.

echo ‘phpredis sample:<br />’;

You can start debugging without error messages, but breakpoints are not hit.

You started debugging using F5 key and it looks like debugging is
started properly, and Internet Explorer is launched properly, but you
can’t hit a breakpoint on my code behind code.

Cause 1: Asp.net debugging is not enabled in the properties of
project. Set this item to True as shown in Figure 8.

澳门葡京备用网址 9

Figure 8. Enabling ASP.NET Debugging

In the case of VB project, the UI is different, but you can recognize
the equivalent one easily.

Cause 2: Please make sure that the expected DLL is loaded with
matched debug symbol file. You can check it with Modules window.

 

Message: The debugger is not properly installed.

澳门葡京备用网址 10

Figure 9. The debugger is not properly installed

If you see this problem, check the debugging feature with in the Console
Application project. If the console application project shows the error
message like Figure 10, it means that your .NET Framework application is
not installed properly.

澳门葡京备用网址 11

Figure 10. Unable to start debugging

You need to register “mscordbi.dll” manually by executing “regsvr32
mscordbi.dll”.

error_reporting(E_ALL);

Message : The server does not support debugging of ASP.NET or ATL server applications.

澳门葡京备用网址 12

Figure 11. Unable to start debugging

If you have a Windows XP Pro or Windows 2000 Pro installed on your
machine, you may need to think about the order of installation between
Visual Studio 7 and IIS. If you install IIS after Visual Studio 7, you
will get this error. In this case, register “aspnet_isapi.dll” with
“aspnet_regiis.exe –i”.

ini_set(‘display_errors’,’ON’);

Message: Access is denied. Verify that you are an administrator or a member of …

澳门葡京备用网址 13

Figure 12. Access is denied

You may not be the member of Debugger Users group on the machine.
Add your user account into Debugger Users group on the machine to
resolve this error.

To add your user account into Debugger Users group, you need to do
the following:

  1. Log in as Administrator.
  2. Run Computer management in Administrator tools.
  3. Choose the Local users and groups\groups node.
  4. Double-click the Debugger Users group in right pane.
  5. Click the Add button in the Debugger users properties dialog
    box.
  6. Type your user account and click OK.

 

Message: Could not start ASP.NET or ATL server debugging.

澳门葡京备用网址 14

Figure 13. ASP.NET or ATL not installed

Cause 1: You may have installed the IIS Lockdown tool. If so,
find the urlscan.ini file, and add DEBUG(case sensitive) into the
[allowverbs] section.

Cause 2: If you are using Domain controller as your server, and your
project is created using a machine name rather than a full domain name,
you may need to change the URL of the project to use full domain name.

Cause3: If your IIS is set to use dedicated IP as Web site
identification
(you can find this option in IIS setting with IIS MMC),
you may see this error message. In this case, you need to change your
project name to use the IP address directly. For existing projects, you
need to change project to use the IP address rather than the machine
name by editing .sln file and .webinfo file.

Cause4: The value in <httpRuntime
maxRequestLength=”#########” /> in the web.config file is
too large. The default unit is Kbyte, not byte, so if you changed this
number and used the wrong unit, it may cause debugging problems.

$redis = new Redis();

Message: Access is denied.

澳门葡京备用网址 15

Figure 14. Access is denied

Cause: You may be a member of the Debugger Users group, but you
don’t have the permissions to debug the aspnet worker process because
you are not the aspnet user account or the member of
Administrators group. Add your user account to the
Administrators group on the machine to resolve this issue.

$redis->connect(‘127.0.0.1’,6379);

Can’t debug with an included File

Inside of ASPX, you can’t debug with an included file. An included file
can often result when you convert old ASP projects to ASPX.

If you include files with <!--#include file = "file name"-->, you may
not be able to debug the include file properly. You need to use
<!--#include virtual="file name"-->instead.

$redis->set(‘first_key_phpredis’, ‘Hello world’);

After changing your password, you need to log off/log in for ASP.NET debugging.

After you change your password, you need to log off and log back on to
do ASP.NET debugging properly.

 

After installing Windows2000 SP4, ASP.NET debugging doesn’t work and it says “Access denied”.

The resolution for this issue is to re-register aspnet_isap.dll with
regsvr32 –i aspnet_isap.dll.

);

You only hit breakpoint the first time the page is loaded.

There may be several different causes for this particular problem, but
the most likely cause is that you have the page cache option set in the
web.config file.

If you see something like
<add key="<your web project name".Web.EnablePageCache" value="True" />
in web.config, you need to set the value to “False” to turn off the
Web page cache. After changing this setting and refreshing the page, you
should be able to hit breakpoint.


You Need to share a Web server for debugging but don’t want to let other users be admin on the machine.

In Visual Studio .NET, there are two things that determine if a user can
debug. One is the Debugger Users group, and the other is user
privilege, such as administrator, power user, or SEDebug.

The Debugger Users group determines if the user can access the VS debug
component (mainly MDM-Machine Debug Manager, which is part of Visual
Studio), so being a member of the group means that you are guaranteed
for accessing MDM. So at this point, you can debug your open process and
see the list of process on your machine.

But after this, whether you can debug other user’s process is decided by
your privilege. For example, if you want to debug other people’s native
process, you should have SEDebug privilege. For the other users’ Managed
process, you should be administrator on the machine.

Because of this restriction, in your scenario, the student should be
granted as admin. If not ASP.NET work process can’t be debugged by
default.

We have a sort of work-around. Cassini is stand-alone small ASP.NET
server. So for students, they can use Cassini for developing things, and
later they just need to deploy thing over to the actual server for
submit the result. The Cassini is available on
http://www.asp.net/Projects/Cassini/Download/.

General Debugging

These cases are based on Console application project type.

Message: Unable to start debugging.

澳门葡京备用网址 16

Figure 15. Unable to start program

The issue causing the error shown in Figure 15 is caused by
mscordbi.dll not being properly registered. Register the file manually
to remedy this problem.

Message: Unable to start debugging. Access is denied.

澳门葡京备用网址 17

Figure 16. Access is denied error message

Ensure that Machine Debugger Manager service is started properly and
that you are a member of Debugger Users or “Administrators.

I can start Managed debugging, but PDB does not load, and I can’t hit any Breakpoints.

If the debugger is launched properly, but you couldn’t hit any BP, you
may need to check the installation of diasymreader.dll. The file may
not be registered. To register it, you need to do:

regsvr32 <path to DLL>\diasymreader.dll

Managed debugging is not working

You attach to native process in CLR mode before the process creates the
CLR object. Managed debugging is not working.

Solution 1: Attach to the process after CLR code is used in the
process.

Solution 2: Attach to the process in InterOp mode. In this case, you
don’t have to attach to the process after CLR code is invoked.

Managed debugger doesn’t respond

When you start debugging with managed code, the debugger doesn’t
respond.

Solution: Make sure that the .NET Framework Support service is
stopped and disabled (stopping the service is not enough).

If you don’t have .NET Framework Support service running, disable
the IIS admin service.

Stepping with C# code is not correct

Consider the following code:

string someStr; 
someStr = "SomeValue"; 
if(someStr == null) 
    Console.WriteLine("what's up?"); 

try 
{ 
} 
catch(Exception e) 
{ 
} 

If you step through this code, you will see that when you step into the
“if” statement, the instruction pointer is moved to the
body(Console.WriteLine("what's up?");) of the “if” statement.

This is not a debugger bug, but it is known issue with try catch block
debug information. See the following disassembled code for an example of
a try catch block in the debugger.

if(someStr == null) 
0000002a  cmp         dword ptr [ebp-18h],0 
0000002e  jne         0000003C 

Console.WriteLine("what's up?"); 
00000030  mov         ecx,dword ptr ds:[01C50070h] 
00000036  call        dword ptr ds:[02F0257Ch] 
0000003c  jmp         00000048 

catch(Exception e) 
0000003e  mov         dword ptr [ebp-1Ch],eax 
00000041  call        762C0846 
00000046  jmp         00000048 

} 
00000048  nop       

When the value is not matched, the instruction pointer is moved to
0000003c  jmp         00000048 line, but the line is mistakenly
matched with the body of the “if” statement. While the code functions
correctly, the appearance is incorrect.

Causality Debugging: Stepping Between Web Service Client and Web Service

Can’t set debugging from the Web service client into a Web service

The default settings do not allow you to step from a Web service client
into a Web service. It works like step-over.

The ASPNET worker process (aspnet_wp.exe or w3wp.exe) is running under
the “aspnet” or “network service” user accounts, and these accounts
don’t have privilege to access MDM through DCOM. So, you need to add
these accounts into the Debugger Users group.

After enabling impersonation of Web service, you can’t do causality stepping.

When impersonation is enabled for the web service with “web.config”,
stepping into from web service client code to web service code is not
working. So it works like step over.

You need to do these things for correct stepping between client and
service.

  • Turn off Anonymous access in IIS.
  • change your client code to set credential to the Web service like
    so:

    Service1 obj = new Service1(); 
    obj.Credentials =  System.Net.CredentialCache.DefaultCredentials; 
    

After this, you will be able to step into the Web service from client.

These are needed, because when you step into the Web service, some .NET
Framework components need to use the system level debugger component
(MDM) to co-create it. If you don’t give your proper credentials, it
fails at this step. Without these the proper credentials, “step into”
works like “step over”.

Debugger hangs

If your Web service client code is running in a STA (Single Thread
Apartment) model, and it is waiting for an async call completion like
the following:

Service1 obj = new Service1(); 
System.IAsyncResult ar = obj.BeginHelloWorld(new System.AsyncCallback(Class1.Handle),obj); 
while(ar.IsCompleted != true) 
{ 
    System.Threading.Thread.Sleep(1000); 
}

The debugger will hang. This hang occurs because one debugger component
is locked by your code inside of the debugger. Solution 1 is to change
your code to use thread sync with event or mutex. The other solution is
to unregister csm.dll. The second solution disables causality stepping
(stepping from Web service client code to Web service method). You may
need to manually attach to aspnet_wp.exe for debugging the Web
service.

Remote Debugging

Can’t see any processes on a remote machine

Make sure that you installed Remote full debug setup on the remote
machine, and that you are a member of the Debugger Users group.

Can’t connect to a remote machine because of RPC issue

The following information is from a KB article written by Mike Clay.

If you see the following error messages while you are connecting to
remote machine with “Processes” dialog:

Error while trying to run project: Unable to start debugging on the

web server. Not enough storage is available to complete this operation.

Or, you this message during ASP.NET debugging:

Error while trying to run project: Unable to start debugging on the web

server. Unable to map the debug start page URL to a machine name.

Ensure that RPC is working properly between your machine and the remote
machine. The following can cause RPC issues:

  • Debugging through a firewall. Microsoft does not recommend or
    support remote ASP.NET debugging through a firewall. The best way to
    do overcome this is use Terminal Services to log into the remote
    server and debug locally.
  • One common failure for RPC is the inability to resolve the remote
    machine name. RPC relies on name resolution for communication
    between machines. If you are unable to resolve the remote servers
    machine name to the correct IP address errors may occur.
  • RPC traffic can flow in one direction but not the other. RPC traffic
    must be able to go from the machine used to do the debugging to the
    remote server and from the remote server back to the machine used to
    do the debugging in order to successfully debug remotely. Make sure
    that RPC communication is enabled in both directions.

To analyze your RPC, you can use the RPCPing tool.

Remote debugging fails with machines on a work group

This occurs when you have two Windows XP Pro machines that are not on a
domain, but on a work group. When you do remote debugging between them,
you can’t access the remote machine at all.

In the work group environment, you need to make sure that you have the
same user account name on both machines with the same password. If not,
DCOM will fail to authenticate.

Also, on Windows XP Pro, the default security setting for Sharing and
security model for local accounts
is set to now allow sharing. Below
are the steps to change this setting:

  1. Run Local Security Settings in Administrator tools.
  2. Select Security settings\Local policies\Security options.
  3. Change Network access : Sharing and Security model for local
    accounts
    from Guest only – local users authenticate as Guest
    to Classic – local users authenticate as themselves.
  4. Reboot the machine.

This change should be applied to both machines for remote debugging.

After you make the setting is changed, you will be able to do remote
debugging with the same name user account on both machines. Please make
sure that your user accounts on each machine has password. In some
cases, without actual password it doesn’t work.

However, because you changed default settings of the security model, it
can expose:

  • Unexpected file sharing
  • Unexpected DCOM components sharing.

Before you make this change, any kind of connection from remote machine
to your machine was guaranteed as Guest, but after this change,
he/she could be authenticated with your local user account. So, like the
case of debugging, if you are sharing out a folder or DCOM object, there
is a possibility that any matched user (same user name and same
password) on other machine could access your shared objects.

I strongly recommend that if you want to use this work-around, you make
sure that all user accounts have strong passwords, or you should setup a
network-island for the debugging machines to prevent any malicious
attacks.

相关文章

发表评论

电子邮件地址不会被公开。 必填项已用*标注

*
*
Website